java spike combat

1. Distributed session

  1. Redis used as a storage container of the session.Token

2. Pressure test

  1. Using JMeter pressure-test, to see the number of qps. According to the server and then the top command to see what processes consume resources.
    JMeter test pressure
    Here Insert Picture Description
    Here Insert Picture Description

3. Page Optimization

  1. Optimization point
    1. + + URL cache page cache object cache "implementation: Take cache -> Manual template rendering -> Output results"
      page cache: In @RequestMapping need to add = Produces "text / HTML", @ responseBody Page Caching
      the URL of the page cache and cache-coherent, only cache key = key + id, id different so that different cached pages.
    2. Static pages, front and rear end of the separator
    3. Static Resource Optimization
    4. CDN optimization

4. spike optimization step

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_38608626/article/details/90233769