Sobes.tech
Senior

What is the maximum number of requests per second you currently handle under high load?

sobes.tech AI

Answer from AI

The maximum number of requests per second (RPS) under high load in Go heavily depends on the specific application, architecture, libraries used, and hardware. For example, a simple HTTP API using net/http can handle tens of thousands of RPS on a modern server with proper optimization.

To measure RPS, load testing tools like wrk, vegeta, or ApacheBench are typically used. In real projects, I have seen figures ranging from 5k to 50k RPS on a single server, but this is very individual.

Here's an example of a simple HTTP server in Go that can handle requests with high performance:

package main

import (
    "fmt"
    "net/http"
)

func handler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintln(w, "OK")
}

func main() {
    http.HandleFunc("/", handler)
    http.ListenAndServe(":8080", nil)
}

To increase RPS, it is important to use profiling, optimize garbage collection, minimize locking, and use efficient data structures.

What is the maximum number of requests per second you… - sobes.tech