• [^] # HAProxy, vive le C, vive la France

    Posté par . En réponse au journal Le TapTempo du web, mais plus rapide. Évalué à 2.

    HAproxy fait beaucoup mieux!

    global
     maxconn 200
    defaults
     mode http
     timeout connect 5000
     timeout client 50000
     timeout server 50000
    frontend http
     bind :::8080 v4v6
     http-request redirect location https://avatar.spacefox.fr/Renard-%[rand(23)]
    
    Running 10s test @ http://localhost:8080/
     4 threads and 10 connections
     Thread Stats Avg Stdev Max +/- Stdev
     Latency 62.45us 163.53us 15.92ms 99.96%
     Req/Sec 32.25k 1.61k 35.73k 63.37%
     1296464 requests in 10.10s, 140.41MB read
    Requests/sec: 128360.73
    Transfer/sec: 13.90MB
    wrk -d10s -t4 http://localhost:8080/ 2.41s user 12.31s system 145% cpu 10.106 total
    

    avec ton code j'obtiens

    Running 10s test @ http://localhost:8080/
     4 threads and 10 connections
     Thread Stats Avg Stdev Max +/- Stdev
     Latency 169.41us 48.95us 1.82ms 89.27%
     Req/Sec 3.31k 2.90k 6.80k 39.39%
     13415 requests in 10.04s, 1.89MB read
    Requests/sec: 1336.17
    Transfer/sec: 193.23KB
    wrk -d10s -t4 http://localhost:8080/ 0.06s user 0.46s system 5% cpu 10.045 tota