Large-scale e-commerce website architecture, excerpt

Source: Internet
Author: User
Tags msmq log4net ibm mq

7. How can I handle multiple languages on the same website? Use the configuration file and use the cookie or URL to identify the problem? === Customers are in their own company. Use the standard method.
8. The most popular e-commerce websites are the discounts for commodities and the complimentary points. How can we design them here (factory model )? === Purchasing mature rule Engines
9. If a large number of orders are concurrently submitted at the same time, what if a valid order is submitted?
= E-commerce generally uses MQ, and ibm mq is recommended; MSMQ can also be used

The first point is that the database should be well designed. At what level, you may need to consider which tables need to be split and which tables need to be redundant. If it is MySQL, consider other issues, such as storage engines.
News must be a pure static page, which imposes much less pressure on the database. However, it is inconvenient to manage static pages. Disk Files must be operated for update, deletion, and addition.
Create a custom cache layer to control the cache logic. You can use a third-party cache module.. Net, which can be cached layer by layer, page cache, and data cache (memcache, but the efficiency is not high in Win)
E-commerce websites are characterized by strict transactions, requiring high performance when designing databases, and appropriate indexes to support high concurrency. They often perform index checks on product table user tables, whether there are many index scans and table scans (even partial, "partial" must be controlled to the minimum)
MSSQL statements must include with (nolock) for queries that do not require transactions, to facilitate concurrent updates.
Some functional modules cannot be developed as expected, such as the number of product visits. Do not place these frequently updated fields in the core table. A clear approach is to separate them.

In addition, the field cannot be designed to be of the bool type on a regular basis, which will leave a way for future expansion. Even for fields such as men and women, tiny type is recommended.

In addition, Seo is fully considered during product design, and the website directory structure is clear and readable, rather than a string of query parameters.
To ensure security, we recommend that you use the stored procedure. Before the project goes online, export all the database stored procedures and then find statements that look like exec. Then, find whether to replace them with sp_executesql.
In addition, if MSSQL is used, full-text search can be used directly with mssql fte, with both speed and accuracy. The most important thing is that maintenance and management development are simple.
Discount processing can be performed according to the secondary price approval function of China Telecom, if you have done a telecommunications system.
Of course, it can also be simpler.

CDN acceleration is recommended for static pages to solve the problem of access speed between China Netcom and China Telecom;
We recommend that you use memcache for data caching. In addition, you can use the existing cache mechanism in. net at the presentation layer and data layer;
Simple SQL statements do not need stored procedures. Stored Procedures occupy the processing time of the database server, resulting in deadlocks;
MVC suggests that you still use CMS projects. E-mall is not very suitable. The URL can be escaped to make the URL display more friendly;
We recommend that you create a distributed database for the database, which transfers queries and large volumes of traffic to put pressure on the database;
Images can be placed on a single server;

1. Three-tier architecture
2. Use handwritten SQL, handwritten entity (generated), and cache reflection binding (not cache data, cache ing). You should consider the long-term development of the website or the flexibility of handwriting.
3. There is no such problem. Commercial-driven, pure shopping is good. Never engage in any circles, wiki.
4. Pure. Net MVC is not recommended. webform does not engage in viewstate, server controls (except repeater), and the idea of adding some MVC is enough.
5. data does not need to be cached (except for the search product ).ProgramRapid deployment, there will be a lot of config files, and config will be serialized and cached
6. Of course, Mr. Cheng is finished. Refer to JD. There are several images of different sizes corresponding to each business image.
7. According to experience, it is not reliable for e-commerce websites to achieve multi-language access only in Chinese and English (Cultural user habits are not simple language switching). If you want to really operate English, you need to develop a new version.
8. No Mode
9. Load Balancing (Web, DB) + SSB Asynchronous Data Processing
10. Are you a business log or an exception log? Abnormal logs are not needed in the order process at the front end. You can find a tool to keep running the script to ensure you can discover problems and send emails at any time.
11. Find a third-party Search Component similar to endeca's
12. Server Load balancer is quite simple. In the early stage, we can rely on software. We can find third-party CDN for all images. There are very few places for front-end websites to use Ajax. If we use jquery

1. Find when 99.5% of e-commerce website users perform Behavior
2. for product search, there is no need for databases (there are many open-source platforms such as online word segmentation)
3. distributed cache (memcached, volecity), personal test volecity 3 is good
4. Operational considerations must be taken into account during system design. Design the system from this perspective
5. For e-commerce websites with frequent changes, you must consider how the architecture design adapts to frequent version updates.
6. A good single sign-on system must be designed.
7. We recommend that you do not use sqlserver.
8. For large e-commerce websites, system I/O is the deciding factor rather than the CPU and memory.

1. Is there any problem with Project Division? The figure shows the entity layer, data access interface layer, data access layer, business logic interface layer, business logic, website A, B, and C.
Project Division is not important. What matters is that you are writing Code Can code be reasonably allocated to the corresponding project.
2. Does the data access layer require development efficiency (nbear, LINQ, NH, etc.) or access efficiency (using SQL directly )? Can I use a data access layer that is highly efficient in development and will be overwritten and replaced later?
Development efficiency is a top priority. After a large volume of traffic, I believe there is money to invest in hardware. If your program is not poorly written, upgrading the hardware is far more cost-effective than optimizing the program.
3. The website is cut into multiple sub-websites. Some controls (such as header and footer) need to be shared. How can we share these controls across website projects?
Then you can create a custom control.
4. Ms MVC 1.0 has been around for a long time. Is it enough to be used in projects? Or is webform used in the website background and MVC used in the foreground?
We recommend that you use webform and MVC at the front end. For the front end, using MVC can improve performance and facilitate page replacement. The background interface is relatively stable. Using webform can improve development efficiency.
5. Does the cache of website data develop a hashtable for maintenance or use memcached?
We recommend that you use hashtable in the early stage because it is simple and will be upgraded to memcached in the future.
6. Processing of thumbnails. I see that some websites are directly generated when uploading images, some are processed in httpmodle and generated during access.
The benefit of generating a thumbnail directly is reduced performance. On the contrary, a new image is generated every time you browse the image. The server is under heavy pressure and we recommend that you generate the image directly.
7. How can I handle multiple languages on the same website? Use the configuration file and use the cookie or URL to identify the problem?
We recommend that you use the resource file provided by Asp.net in multiple languages. The current language is stored in cookies.
8. The most popular e-commerce websites are the discounts for commodities and the complimentary points. How can we design them here (factory model )?
Rule Engine
9. If a large number of orders are concurrently submitted at the same time, what if a valid order is submitted?
Use MQ queue
10. Log, log4net?
Log4net can only record program running logs. It is mainly used to debug programs. you have to create a table to store system business operation logs.
11. Full-text retrieval of e-commerce is also a headache
Lucene, Microsoft Index Service, and sqlserver full-text retrieval have many solutions.
12. What are the advantages of Server Load balancer? Article Referral code?
See Windows 2003 cluster articles

1. Is there any problem with Project Division? The figure shows the entity layer, data access interface layer, data access layer, business logic interface layer, business logic, website A, B, and C.
This is the same for me currently. However, when the data table structure is modified, it will lead to cascade modification of other layers, which is very inconvenient. Therefore, it is best to improve the database design before development. In addition, when a website is divided into multiple DLL files, the DLL files generated by other projects should be deployed in the bin folder of each website and re-deployed once the updates are updated. This is also annoying, of course, you can deploy the DLL to GAC to solve this problem, but it is not convenient to debug it locally because the project has been changed, you need to copy the generated DLL to GAC again to see the effect.
2. Does the data access layer require development efficiency (nbear, LINQ, NH, etc.) or access efficiency (using SQL directly )? Can I use a data access layer that is highly efficient in development and will be overwritten and replaced later?
I am also considering this. Currently, I have not used the ORM framework, and all of them access the database directly in the Dal.
3. The website is cut into multiple sub-websites. Some controls (such as header and footer) need to be shared. How can we share these controls across website projects?
Custom Controls.
4. Ms MVC 1.0 has been around for a long time. Is it enough to be used in projects? Or is webform used in the website background and MVC used in the foreground?
Learning this part.
5. Does the cache of website data develop a hashtable for maintenance or use memcached?
Now I am using a lot of data caches that come with. net.
6. Processing of thumbnails. I see that some websites are directly generated when uploading images, some are processed in httpmodle and generated during access.
Generate directly, faster.
7. How can I handle multiple languages on the same website? Use the configuration file and use the cookie or URL to identify the problem?
I don't think this part is involved, but I think the resource file should be used to solve this problem.
8. The most popular e-commerce websites are the discounts for commodities and the complimentary points. How can we design them here (factory model )?
These are all placed on the logic layer.
9. If a large number of orders are concurrently submitted at the same time, what if a valid order is submitted?
MSMQ
10. Log, log4net?
Currently, I write code in the library.
11. Full-text retrieval of e-commerce is also a headache
You can use the e.net token to create an index and then search directly from the index library. This is fast and accurate.
12. What is the recommended code for Server Load balancer?
I don't know.

This design is definitely impossible to achieve the effect of the new egg. The new egg should say that there are hundreds of servers, and there are thousands of publishing and subscription links between different databases. There is a complex caching and load balancing mechanism. All new eggs communicate based on WCF. In addition, for such a large website, the database does not stop for a moment, so read/write splitting is also very important, because you cannot stop the database for backup. It seems that it is not enough for a large e-commerce website like xinegao to be painted on it.

However, for public headers and footer, I do not recommend custom controls. This is inconvenient to maintain. dll release is required for slight changes, which is troublesome.
If your header and footer are not very large, we recommend using JS + CSS. Compression and CDN cache should be added to ensure high efficiency.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.