Concurrency solutions for large distributed Web sites

Source: Internet
Author: User

Large Distributed Web site:

1 increase the cache and reduce the number of disk accesses. Index the stored data to speed up and reduce the amount of disk access by addressing the index.

2 Web Front end tuning: Reduce the number of network interactions (multiple request merges).

Reduce the amount of data transmitted over the network (compression)

Minimize coding (convert characters to bytes as early as possible, or reduce the conversion process from character to byte)

Using browser caching

Reduce cookie Transmission

Reasonable layout page, using page compression, lazy loading page, CSS on the top, JS in the following, CDN, reverse proxy, page static, offsite deployment

3 Service demotion: Denial of service and shutdown of services

4 Fail-over: If any of the servers in the database cluster are down, all read and write operations on the server by the application need to be rerouted to the other servers.

5 Performance Optimization: 1, Web front-end performance optimization:

Browser Access optimization: Reduce HTTP requests, use browser caching, enable compression, CSS on top of the page, JavaScript on the bottom of the page; reduce cookie transmission

CDN Acceleration, Reverse proxy 2, Application server performance optimization: Distributed Cache (Redis, etc.), asynchronous operations (Message Queuing), optimization with cluster (load Balancing) code 3 storage performance optimization, mechanical HDD vs SSD, B + Tree vs

LSM tree, RAID vs HDFS

6 code optimization

Multithreading (Q: How to ensure thread safety?) What is the lock-free mechanism? )

Resource reuse (singleton mode, connection pool, thread pool)

Data

Garbage collection

Concurrency solutions for large distributed Web sites

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.