You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Vadim Permakoff (JIRA)" <ji...@apache.org> on 2007/10/20 02:43:50 UTC

[jira] Issue Comment Edited: (HTTPCLIENT-643) Provide fail-over for multi-home remote servers (if one server in a farm goes down)

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536212 ] 

vadim62 edited comment on HTTPCLIENT-643 at 10/19/07 5:43 PM:
----------------------------------------------------------------------

I see. This is what I did not mention: I registered http protocol with MultiHomeProtocolSocketFactory and https with MultiHomeSSLProtocolSocketFactory.

  // register custom http and https protocols
  static
  {
    Protocol protocolHttp = new Protocol("http",
                                     (ProtocolSocketFactory)new MultiHomeProtocolSocketFactory(),
                                     DEFAULT_HTTP_PORT);
    Protocol.registerProtocol("http", protocolHttp);
    Protocol protocolHttps = new Protocol("https",
                            (ProtocolSocketFactory)new MultiHomeSSLProtocolSocketFactory(),
                            DEFAULT_HTTPS_PORT);
    Protocol.registerProtocol("https", protocolHttps);
  }

I did not need to change any code in HTTP Client (which I like a lot, nice architecture!), just created these 2 Factories and registered in my other class. In this case the MultiHomeProtocolSocketFactory.createSocket() will be called from ControllerThreadSocketFactory.createSocket().


      was (Author: vadim62):
    I see. This is what I did not mention: I registered http protocol with MultiHomeProtocolSocketFactory and https with MultiHomeSSLProtocolSocketFactory.

  // register custom http and https protocols
  static
  {
    Protocol protocolHttp = new Protocol("http",
                                     (ProtocolSocketFactory)new MultiHomeProtocolSocketFactory(),
                                     DEFAULT_HTTP_PORT);
    Protocol.registerProtocol("http", protocolHttp);
    Protocol protocolHttps = new Protocol("https",
                            (ProtocolSocketFactory)new MultiHomeSSLProtocolSocketFactory(),
                            DEFAULT_HTTPS_PORT);
    Protocol.registerProtocol("https", protocolHttps);
  }

I did not need to change any code in HTTP Client (which I like a lot, nice architecture!), just created these 2 Factories and registered in my other class.

  
> Provide fail-over for multi-home remote servers (if one server in a farm goes down)
> -----------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-643
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-643
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 3.1 RC1
>         Environment: All environments
>            Reporter: Vadim Permakoff
>            Priority: Minor
>             Fix For: 4.0 Beta 1
>
>         Attachments: MultiHomeProtocolSocketFactory.java, MultiHomeSSLProtocolSocketFactory.java
>
>
> The HTTP Client does not provide automatic fail-over for multi-home remote servers (web-farm) if one server in a farm goes down

-- 
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