Nginx + ATS Cache Scenario
Scenario Description
Nginx is used for Layer 7 load balancing, and Apache Traffic Server (ATS) is used for cache management.
Solution Overview
Kunpeng servers use Nginx as the Layer 7 load balancing servers and ATS as the cache management software. The multi-core capabilities of Kunpeng processors are leveraged to provide high CDN throughput and low average response latency, and to handle a large number of requests.
Similar to L2 central or regional nodes, L1 edge nodes cache data. Their solutions and principles are basically the same. But because they are targeted to different objects, their configurations are slightly different. The following uses L1 edge nodes as an example.
- L1 edge nodes use LVS for Layer 4 load balancing, Nginx for Layer 7 load balancing, service logic processing and security protection of cache nodes, and ATS for drive and cache management.
- After a subscriber request reaches the Layer 4 load balancing LVS, the LVS polls any available device at the backend and forwards the request to the Layer 7 load balancing Nginx of the device.
- After receiving the request, Nginx finds a proper cache node ATS based on the URL consistent hash algorithm.
- After receiving the request, ATS queries the local cache. If the cache is not hit, ATS queries the content retrieval route from the global scheduler and retrieves the content from the upper-level node. Then, multiple content retrievals of the same resource are aggregated.
- If ATS finds that the cache is hit, it reads data from the local storage (memory, SSDs or HDDs) and sends the data to the subscriber.
For details about how to deploy the solution, see Kunpeng BoostKit for CDN Deployment Guide. If you need to accelerate the decryption of the RSA2048 algorithm in HTTPS and offload SSL to the hardware accelerator for further improving the performance, use Tengine to replace Nginx by referring to Tengine 2.2.2 Porting Guide, install the Kunpeng accelerator driver by referring to the steps described in this document and enable the asynchronous call to OpenSSL in Tengine.