Why nginx AND varnish? I thought varnish could proxy as well? Or maybe could you explain your setup.
Depending on how you choose to implement it, this may also result in cleaner architecture if you have Varnish as a simple HTTP brick with little knowledge of the backend implementation, leaving all of the gory details to nginx.