You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Asankha C. Perera (JIRA)" <ji...@apache.org> on 2007/12/11 20:32:43 UTC

[jira] Updated: (HTTPCORE-127) Expose improved API for lifecycle management

     [ https://issues.apache.org/jira/browse/HTTPCORE-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asankha C. Perera updated HTTPCORE-127:
---------------------------------------

    Attachment: httpcore-127.patch

Hi Oleg

Sorry for the delay in getting back on this as I was traveling last week.

I updated my patch against the latest revision of HttpCore today, but do not seem to require the new ListenerEndpoint interface introduced. If you get a chance could you check this patch for the DefaultListeningIOReactor that allows one to pause() or resume() accepting new connections. 

>From the Synapse point of view, we want to pretend to be "down" for a load balancer in front of us until we finish off serving all in-flight requests, so that new requests would be directed to another instance so that one node can be cleanly brought into a maintenance mode or for shutdown.

I have also introduced another method maintenenceShutdown(long ms) which is expected to pause() and wait a maximum of ms millis before killing off any pending requests.. however it seems to kill all connections ASAP.. is this expected behavior or is there something else about the shutdown() method that I haven't yet noticed?

thanks
asankha

> Expose improved API for lifecycle management
> --------------------------------------------
>
>                 Key: HTTPCORE-127
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-127
>             Project: HttpComponents Core
>          Issue Type: Improvement
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha6
>            Reporter: Asankha C. Perera
>             Fix For: 4.0-beta1
>
>         Attachments: httpcore-127.patch
>
>
> Apache Synapse uses HttpCore and we would like to stop accepting new connections to put our servers into a "maintenance" mode. In this mode any in-flight requests already being served will continue as normal (i.e. reading, writing etc) but new connections should be rejected, so that a load balancer could direct new connections to another instance in the cluster. The requirement is to then update configuration, apply patches or cleanly shutdown etc. for maintenance without effecting any in-flight requests.
> Implementation wise I think this would be fairly straightforward as we can remove OP_ACCEPT from the interested ops.
> On the mailing list Odi suggested that we tackle this at a broader level by exposing lifecycle management APIs
> "I suggest create, start, stop, destroy methods in some classes/APIs (semantics of JBoss Service MBeans)"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org