users@jersey.java.net

[Jersey] UriInfo_at_getBaseUri() with a load balancer

From: Eric Stein <steine_at_locustec.com>
Date: Wed, 5 Mar 2014 17:14:56 +0000

Let's say I put a load balancer in front of my Jersey API server. So a client would call:

http://mylb.example.com/api/resources/12

which would push the call through to one of

http://server1.example.com/api/resources/12
or
http://server2.example.com/api/resources/12

When I call UriInfo#getBaseUri(), what will I see?
http://mylb.example.com/
or
http://server1.example.com/

Thanks,
Eric