How to solve high concurrency in JAVA?

1. Background of the problem:

What is high concurrency?

Concurrency is the ability to use multiple threads or processes to process (that is, concurrently) different operations at the same time.

For some large websites, such as portal websites, how to deal with a large number of user visits and high concurrent requests?

 

2. How to solve the high concurrency problem?

The solutions are as follows:

1. Cache: Use cache reasonably, such as: redis, memcached, ehcache, etc.;

2. Use CDN to make pages static, and use CDN to cache and accelerate;

3. Dynamic and static separation: static resources (for example: css, js, etc.) and image resources are deployed separately;

4. Use clustering and load balancing;

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326488491&siteId=291194637