Thanks. And I want to know the time when "proxy_set_header" is executed, because the my cookie value is related to the chosen upstream server. So will proxy_set_header happen before upstream peer initialization or after that? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,201413,201474#msg-201474