java - How do you handle large traffic on load? -


we working project has huge traffic load on chinese new year eve. our target throughput 20w pqs , did not ever have experience handling such large traffic before.

we using spring mvc backend , mysql percona cluster database layer , redis cache. our network infrastructure lvs->nginx->tomcat ->mysql/redis.

what when working on such scenario?

first need scale application running pat kind of testing.

and,

there 3 main strategies handling load:

  1. the site can invest in single huge machine lots of processing power, memory, disk space , redundancy.
  2. the site can distribute load across number of machines.
  3. the site can use combination of first 2 options.

when visit site has different url every time visit (for example www1.xyz.com, www2.xyz.com, www3.xyz.com, etc.), know site using second approach @ front end. typically site have array of stand-alone machines each running web server software. have access identical copy of pages site. incoming requests pages spread across of machines in 1 of 2 ways:

  • the domain name server (dns) site can distribute load. dns internet service translates domain names ip addresses. each time request made web server, dns rotates through available ip addresses in circular way share load. individual servers have common access same set of web pages site.
  • load balancing switches can distribute load. requests web site arrive @ machine passes request 1 of available servers. switch can find out servers 1 least loaded, of them doing equal amount of work. approach howstuffworks uses servers. load balancer spreads load among 3 different web servers. 1 of 3 can fail no effect on site.

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -