Hi all. :-)

We are experiencing some issues with the NGINX proxy for SOAP Requests over HTTP.

Our setup is the following:
- a couple of mail store server each holding some users
- a couple of load balanced mail proxy forwarding IMAP/POP and HTTP
- a Funambol server for Calendar/Contacts/AddressBook sync with Outlook and Mobile Platforms.

Tracing Funambol requests to the mail proxys we found that on the first request NGINX fails to recognize the user string in SOAP request and falls back to round robin distribution, leading to odd/even failure while accessing to user's data.

This is the relevant debug log:

Code:
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: prepare route for proxy
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: examining uri:/service/soap/ for REST
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: examining uri:/service/soap/ for ActiveSync
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: examining uri:/service/soap/ for caldav
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: search for ZM_AUTH_TOKEN
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: examing query-string  for field:zauthtoken
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: no ZM_AUTH_TOKEN
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: routing by iphash
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: prepare upstream connection, try: 2
2010/09/09 18:36:19 [debug] 14662#0: *45 zmauth: mailstore1_ipaddress:8080 elected by iphash
First SOAP request is actually for authentication. When it is successful, ZM_AUTH_TOKEN is set and following requests are routed correctly. Otherwise, when the first request is routed to the wrong backend server (the one that does not handle the user data), authentication fails and no ZM_AUTH_TOKEN is set, leading to synchronization failure.

Does anybody have the same experience and can share thoughts about a possible solution?

Thanks.