超越300万 - 基于LVS构建可扩展的WEB集群

超越300万 - 基于LVS构建可扩展的WEB集群

原文:

Created on 22 April 2012  By  Dakini

3 Million and Beyond - Creating Scalable Web Clusters with LVS

PART1: How to Generate Millions of HTTP Requests

PART2: Tuning Nginx for Best Performance

PART3: Building a Load-Balancing Cluster with LVS


翻译:

超越300万 - 基于LVS构建可扩展的WEB集群

第一部分: 如何生成百万级别的HTTP请求

第二部分: Nginx性能调优

第三部分: 基于LVS构建负载均衡集群


When I first set out on this project, I was asked to build a cluster of web servers that could handle 3 million http requests per second. After much tinkering and tuning, I was able to make it happen using Linux Virtual Server (Red Hat's load balancer), Nginx (a fast http server), and Tsung (a heavy-duty distributed load generator).

当我开始接手这个项目时,需求是构建一个能处理每秒300W次请求的WEB集群。在经过很多思考和尝试后,我使用 Linux虚机(red hat load balancer),nginx(一个高效的http服务器)和 Tsung (一个给力的分布式压测工具)搞定了!

Network
I found that LVS scales incredibly well on a 10-gigabit network with little tuning, and it seemed to handle large amounts of http traffic with relative ease. My LVS Router's load remained very low (under 1.00, on average), since LVS Direct Routing allowed the web servers (cluster nodes) to handle the bulk of the traffic.

Cluster specs
I used 6 web servers, 1 LVS Router, and 7 Load Generators. The machines were SuperMicro 1U servers with dual-socket Westmere Xeon (6-core) processors, and 48G RAM. The important part here was the network. 10-gigabit ethernet allowed my cluster to distribute large amounts of http traffic among the nodes.

Results
While the original goal was 3 million requests/sec, I was able to get up to about 5 million regularly, through repeated tests. (If you count the very highest spike in traffic, it actually peaked around 8 million). The type of data being transferred was very small (a static text file containing a single character), since this is a test of raw req/sec and not a real-world simulation.

The following 3 articles give an idea of how this was done, and provides a basic guideline for creating your own high-performance web cluster.












你可能感兴趣的:(nginx,Web,LVS,高并发,集群,架构,性能测试,tsung,可扩展,300万)