I've always felt that the performance of Cloudfoundry's gorouter is not reliable, or that our Cloudfoundry deployment architecture is problematic, thinking about some stress tests, but has been plagued by tools that don't have stress testing. Last week, the department needed a test report, just to take this opportunity. Perform a better test.
When testing, is the use of the two Gorouter+nginx, testing the use of the application is a relatively simple application, using LoadRunner for stress testing, using LoadRunner 1000 users, the test results are very poor. and QQ Group of students to communicate, they also appeared similar problems, using F5 or haproxy are very normal, but the use of Nginx appeared many problems, performance is very poor. So also try to use Haproxy to do load balancing.
Haproxy deployment is not described, using the Haproxy default configuration, performance is also very poor, start tuning. Initially thought it was an application, a gorouter problem, but the positioning for a long time, found that these currently do not seem to have any problems. Finally, the configuration file for Haproxy is optimized and my Haproxy profile is:
Global
Log 127.0.0.1 syslog Info
Daemon
Maxconn 300000
Spread-checks 4
Nbproc 8
Defaults
Log Global
Timeout Connect 30000ms
Timeout Client 300000ms
Timeout Server 300000ms
# Maxconn 320000
# option Http-pretend-keepalive
Option Dontlognull
Option Forwardfor
Option Redispatch
Option Abortonclose
Listen Admin_stats
Bind 0.0.0.0:1080
Mode http
Option Httplog
Maxconn 10
Stats Refresh 30s
Stats Uri/stats
Stats Realm xingcloud\ Haproxy
Stats Auth Admin:admin
Stats Hide-version
Frontend http-in
Mode TCP
Bind *:80
Reqadd x-forwarded-proto:\ http
Default_backend tcp-routers
Backend Tcp-routers
Mode TCP
Balance Source
Server Node1 10.106.1.46:80 weight Inter rise 2 Fall 5 Maxconn 10000
Server Node2 10.106.1.57:80 weight Inter rise 2 Fall 5 Maxconn 10000
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/cloud-computing/