You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -421,7 +421,7 @@ A `Codec` object encodes and decodes _wire_ protocols, such as HTTP. You can use
421
421
422
422
In Finagle, RPC servers are built out of a `Service` and zero or more `Filter` objects. You apply filters to the service request after which you execute the service itself:
423
423
424
-

424
+

425
425
426
426
Typically, you use a `ServerBuilder` to create your server. A `ServerBuilder` enables you to specify the following general attributes:
427
427
@@ -1164,7 +1164,7 @@ A client can access a cluster, as follows:
1164
1164
1165
1165
1166
1166
1167
-
<a href="Configuring Finagle Servers and Clients"</a>
1167
+
<ahref="Configuring Finagle Servers and Clients"></a>
1168
1168
1169
1169
## Configuring Finagle Servers and Clients
1170
1170
@@ -1198,7 +1198,7 @@ Next we note the required parameters for the `ClientBuilder`.
1198
1198
1199
1199
When diving into configuration, we see two main abstractions. The first is the trio of client, hosts, and connections. A client may be implemented as a collection of one or more hosts, together with a policy that distributes client machines among the hosts. And each host may allow one or more connections to it, exposing concurrency among requests to the client and allowing parallel execution.
1200
1200
1201
-

1201
+

1202
1202
1203
1203
The second main abstraction is the codec, which is responsible for turning a stream of bytes into a discrete request or response.
1204
1204
@@ -1218,12 +1218,12 @@ The purpose of a Cluster is to abstract a group of identical servers, where requ
1218
1218
1219
1219
> The Finagle balancing strategy is to pick the endpoint with the least number of outstanding requests, which is similar to a *least connections* strategy in other load balancers. The Finagle load balancer deliberately introduces jitter to avoid synchronicity (and thundering herds) in a distributed system. It also supports failover.
1220
1220
1221
-
The simplest way to implement a custom load balancing strategy is to create your own client per endpoint and then write your own load balancer across that. The <ahref="https://github.com/twitter/finagle/blob/master/finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/HeapBalancer.scala">HeapBalancer</a> code provides a solid starting point; note it uses a heap to identify the endpoint with the least number of requests (`Ordering.by { _.load `}, where {load} is the number of connections).
1221
+
The simplest way to implement a custom load balancing strategy is to create your own client per endpoint and then write your own load balancer across that. The <ahref="https://github.com/twitter/finagle/blob/master/finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/HeapBalancer.scala">HeapBalancer</a> code provides a solid starting point; note it uses a heap to identify the endpoint with the least number of requests (`Ordering.by { _.load }`, where `load` is the number of connections).
1222
1222
1223
1223
1224
1224
### Idle Times
1225
1225
1226
-
.bq`hostConnectionIdleTime` vs. `hostConnectionMaxIdleTime`: with respect to the `ClientBuilder`, what's the difference?
1226
+
>`hostConnectionIdleTime` vs. `hostConnectionMaxIdleTime`: with respect to the `ClientBuilder`, what's the difference?
1227
1227
1228
1228
`hostConnectionIdleTime` applies to the pool: "the amount of time a connection is allowed to linger (when it otherwise would have been closed by the pool) before being closed". `hostConnectionMaxIdleTime` applies to the physical connection: "the maximum time a connection is allowed to linger unused".
0 commit comments