Can Nginx servers scale to the level of Google
Google uses millions of servers around the world to distribute their load in an even manner, and the servers are custom Google servers instead of standard ones like Apache or Nginx. Average Google load is around 40,000 queries per second, translating to 3.7 billion searches per day and 1.2 trillion queries per year. This of course also includes peak load moments like election results being announced somewhere or some game scores being updated. Is Nginx, which is open sourced and freely available, capable of handling such load (of course with right hardware wired to it)? Or is there something inherently lacking in Nginx or Apache or other servers that Google had to settle for a custom home-made server to handle its traffic? Can a series of Nginx servers distributed around the world at opportune places provide similar level of performance for a website of traffic at the level of Google?
19 comments
[ 3.3 ms ] story [ 40.3 ms ] threadDifferent needs for different usecases where NGINX is more of an OOTB situation. NGINX is great. I see Caddy mentioned quite a bit, believe it’s written in Go where NGINX is written in C. Cloudflare wrote Pingora in Rust IIRC and I want to say they are releasing an open source flavor
Nginx is quite scalable with the right configuration and hardware, but most of the times you want to use more instances of it to scale to this kind of traffic.
Modern, Envoy based proxies are quite popular, and can scale better with better performance, mostly due to the fact it’s written in C++.
You can scale horizontally with a lot of web servers and load balance them. You don't need to stretch load balancer clusters across AZs/regions, so I see no reason why Nginx wouldn't work.
I assume at that scale session cookies are shared without application server clustering. A distributed KV store is probably enough.
They also wanted something written in a memory-safe language so it could be extended without easily falling into memory safety issues. NGINX is written in C.
Source: https://davidwalsh.name/pornhub-interview