SystemBricks

Nginx

WordPress.com Serves 70,000 req/sec and over 15 Gbit/sec of Traffic using NGINX

WordPress.com is serving about 70,000 req/sec and over 15 Gbit/sec of traffic from its NGINX powered load balancers at peak, with plenty of room to grow. Hardware configuration is Dual Xeon 5620 4 core CPUs with hyper-threading, 8-12GB of RAM, running Debian Linux 6.0.

Testing the Performance of NGINX

Load Balancer

Load Balancing (samwho.dev)

Let’s Create a Simple Load Balancer With Go - kasvith.me

func lb(w http.ResponseWriter, r *http.Request) {
	attempts := GetAttemptsFromContext(r)
	if attempts > 3 {
		log.Printf("%s(%s) Max attempts reached, terminating\n", r.RemoteAddr, r.URL.Path)
		http.Error(w, "Service not available", http.StatusServiceUnavailable)
		return
	}

	peer := serverPool.GetNextPeer()
	if peer != nil {
		peer.ReverseProxy.ServeHTTP(w, r)
		return
	}
	http.Error(w, "Service not available", http.StatusServiceUnavailable)
}

Self-hosting

我希望我的 Web 服务器位于我房间的角落 (interconnected.org)

我在单个服务器上自托管数十个 Web 应用程序 + 服务的设置 - Casey Primozic 的主页