There are many ways:
1. Config load balancer
You can config your load balancer so that it directs the same client to the same server. The load balancer may do that based on the client IP, or it injects cookie to responses, to mark the server ID, so that when subsequent requests from the same client come in, it knows which server to redirect the requests to. There are 2 kinds of load balancer: level 4 and level 7. Level 7 can understand HTTP so that it can inject cookie to responses and take the cookie out from requests. Level 4 doesn't care about the (HTTP) protocol above the TCP connection (it only cares about sending bytes between clients and servers, it doesn't look into the bytes to understand their meaning). Level 7 is more featureful but cost more resources than level 4.
Note about HTTPS:
If you want to use HTTPS but the load balancer doesn't handle HTTPS, you have to use level 4 (because the purpose of HTTPS is to prevent man-in-the-middle like load balancers to understand the bytes).
If you use this solution, investigate about popular load balancers/reverse proxies like HAProxy and Nginx. Example:
https://serversforhackers.com/editions/2014/07/29/haproxy-ssl-termation-pass-through/2. Save session at client side
You can save session data to cookie at your application level (write logic at the servers to save session data to cookie).
Notes:
* If you use WebSocket, the server can send multiple WebSocket frames, but you can only set the response cookie only once before upgrading the connection from HTTP to WebSocket.
* Cookie has size limit of 4KB, you can't save too much data in it.
* You may need to encrypt data in cookie, because it's stored at the client side, so it may be inspected and altered.
3. Save session data at server side
Save it in DB or something more realtime like Hazelcast:
http://hazelcast.org/To avoid all the headache, you can just use a framework that has built-in support for the problem, like Xitrum (disclaimer: I'm its creator :D):
http://xitrum-framework.github.io/