I'm trying to understand why a particular load balancer --> web server configuration works so please allow me to paint the picture.
I have an F5 load balancer (LB) which passes traffic to a web server (WSvr). The WSvr is running IIS 8.
LB has its own SSL certificate, i.e. https://www.example.com. The WSvr has a separate SSL certificate, i.e. https://myWebServer.example.com.
I expected this LB --> WSvr configuration to fail but it actually worked and I really don't understand why. Not only did it work but I was able to authenticate into the web application that's hosted on the WSvr, which means the session stayed active throughout.
I thought that if you choose to go with a certificate on the LB and the WSvr, the same certificate must be installed on both machines. That is, the LB IP address and the WSvr IP address must map to the same DNS name, i.e. www.example.com. Not two completely separate certificates. (In my case, the LB maps to www.example.com. And the WSvr maps to myWebServer.example.com.) How is it that the LB can talk to the WSvr and keep the session active?
This is how I picture a typical request with the above scenario (which is obviously not correct based on what's actually happening, but it illustrates why I thought it would fail):
LB encrypts www.example.com/login.html via LB's SSL cert and passes it to the WSvr
SSL is stripped from the request, killing the session. WSvr re-encrypts it with its own SSL cert, creating a new session.
I would appreciate if someone can enlighten and steer me on the right path and explain why I'm incorrect and why the above configuration works.
Thank you very much for your time.