[dev] Load balancer SSL session hooks

Igor Sysoev is at rambler-co.ru
Sun Dec 2 13:57:04 MSK 2007

On Sun, Dec 02, 2007 at 11:45:20AM +0100, Grzegorz Nosek wrote:

> I have a question about the SSL hooks in load balancer modules, i.e.:
> #if (NGX_SSL)
> ngx_event_set_peer_session_pt    set_session;
> ngx_event_save_peer_session_pt   save_session;
> #endif
> inside struct ngx_peer_connection_s. How are they used? When are they
> called? I implemented them "blindly" for upstream_fair as I don't
> remember ever seeing them called. They look like support for https
> proxying but I can't see the bigger picture.

set_session is called before handshaking to upstream, it sets saved
previously SSL peer session for new connection.

save_session is called just after handshake has been done, it saves/replaces
new SSL session for a peer.

Igor Sysoev

More information about the nginx mailing list