| //// |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License |
| //// |
| |
| // Module included in the following assemblies: |
| // configuring-network-connections.adoc |
| |
| [id='understanding-connection-failover-{context}'] |
| = Understanding connection failover |
| |
| If a connection between a router and a remote host fails, connection failover enables the connection to be reestablished automatically on an alternate URL. |
| |
| A router can use connection failover for both incoming and outgoing connections. |
| |
| Connection failover for outgoing connections:: |
| By default, when you configure a `connector` on a router, the router attempts to maintain an open network transport connection to the configured remote host and port. If the connection cannot be established, the router continually retries until the connection is established. If the connection is established and then fails, the router immediately attempts to reestablish the connection. |
| + |
| When the router establishes a connection to a remote host, the client may provide the router with alternate connection information (sometimes called failover lists) that it can use if the connection is lost. In these cases, rather than attempting to reestablish the connection on the same host, the router will also try the alternate hosts. |
| + |
| Connection failover is particularly useful when the router establishes outgoing connections to a cluster of servers providing the same service. |
| |
| Connection failover for incoming connections:: |
| You can configure a `listener` on a router to provide a list of failover URLs to be used as backups. If the connection is lost, the client can use these failover URLs to reestablish the connection to the router. |