Finding the Livy server that owns a session
Behind HAProxy, all Livy servers share one URL. To connect another client, such as
Beeline, to an existing interactive session, find the Livy server that owns the session from the
livyHost field and map it to the matching SRV_ID
cookie.
For interactive sessions, Livy adds a livyHost entry to the
appInfo map of the session. The entry contains the host name of the Livy
server that answered the request, which is the leader of the backend that owns the
session.
SRV_ID cookie reach
the backend that owns the session. If the leader of that backend changes, HAProxy sends the
requests to the new leader in the same backend.