Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Updating SSL keystore


On Wed, Feb 8, 2017 at 11:25 AM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
> On Tue, Feb 7, 2017 at 10:44 PM, Travis Spencer
> <travislspencer@xxxxxxxxx> wrote:
>> I guess we'd have to bring up the new Jetty instance on the new port/address
>> while old connections on the old Jetty instance drain out. Then, we can
>> shutdown the old instance. Would be nice if Jetty did this itself, but we
>> can as well, I suppose. How can we tell if all the connections have drained?
>> Any clue?
> In general, it's not possible. You can have a client that polls
> forever, so that connection will never be idle to be closed.

To be clear, it's the application job to disconnect clients if it
detects the will to restart.
Imagine if you have login credentials stored in the HttpSession: if
you restart the server all that will be gone, so you will need to
cluster it and divert the traffic to the new node.
Things get complicated pretty easily, and it's not something that
Jetty can guess or do for you - as it has no knowledge of what your
application is doing.

It's the application that needs to have a "going to shutdown feature",
gently disconnect clients, make sure state is replicated, etc.

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.

Back to the top