Skip to content

Commit 3d1ae88

Browse files
committed
Minor rephrasing
1 parent 816fe0b commit 3d1ae88

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

toc/rfc/rfc-draft-hash-based-routing.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ offered as a global setting.
6666

6767
Rehashing should be minimized, especially when the number of application instances changes over time.
6868

69-
For the scenario where a new application instance (e.g. app_instance3) is deployed, Gorouter updates the mapping so that
70-
it maps part of the hashes to the new instance.
69+
For the scenario when a new application instance (e.g. app_instance3) is added, Gorouter updates the mapping so that it
70+
maps part of the hashes to the new instance.
7171

7272
| Hash | Application instance(s) before | Application instance(s) after a new instance added |
7373
|-------|--------------------------------|----------------------------------------------------|
@@ -77,8 +77,8 @@ it maps part of the hashes to the new instance.
7777
| ... | ... | ... |
7878
| HashN | app_instance2 | app_instance3 |
7979

80-
For the scenario that the application has been scaled down, Gorouter updates the mapping immediately after routes
81-
update, so that it remaps hashes associated with the app_instance3:
80+
For the scenario when the application is scaled down, Gorouter updates the mapping immediately after routes update, so
81+
that it remaps hashes associated with the app_instance3:
8282

8383
| Hash | Application instance(s) before | Application instance(s) after the app_instance_3 removed |
8484
|-------|--------------------------------|----------------------------------------------------------|
@@ -91,18 +91,18 @@ update, so that it remaps hashes associated with the app_instance3:
9191

9292
#### Considering a balance factor
9393

94-
Before routing a request, the current load on each application instance must be evaluated using a balance factor. The
95-
number of in-flight requests measures this load. For example, with a balance factor of 150, no application instance
94+
Before routing a request, the current load on each application instance must be evaluated using a balance factor. This
95+
load is measured by the number of in-flight requests. For example, with a balance factor of 150, no application instance
9696
should exceed 150% of the average number of in-flight requests across all application instances. Consequently, requests
9797
must be distributed to different application instances that are not overloaded.
9898

9999
Example:
100100

101-
| Application instance | Current request count | Request count / average number of in-flight requests |
102-
|----------------------|-----------------------|------------------------------------------------------|
103-
| app_instance1 | 10 | 20% |
104-
| app_instance2 | 50 | 100% |
105-
| app_instance3 | 90 | 180% |
101+
| Application instance | Current request count | Current request count / Average number of in-flight requests |
102+
|----------------------|-----------------------|--------------------------------------------------------------|
103+
| app_instance1 | 10 | 20% |
104+
| app_instance2 | 50 | 100% |
105+
| app_instance3 | 90 | 180% |
106106

107107
Based on the average number of 50 requests, the current request count to app_instance3 exceeds the balance factor. As a
108108
result, new requests to app_instance3 must be distributed to different application instances.
@@ -120,14 +120,14 @@ A possible presentation of deterministic handling can be a ring like:
120120

121121
#### Gorouter
122122

123-
- The Gorouter MUST be extended to take a specific identifier via the request header
124-
- The Gorouter MUST implement hash calculation, based on the provided header
125-
- The Gorouter SHOULD store the mapping between computed hash values and application instances locally to avoid
123+
- Gorouter MUST be extended to take a specific identifier via the request header
124+
- Gorouter MUST implement hash calculation, based on the provided header
125+
- Gorouter SHOULD store the mapping between computed hash values and application instances locally to avoid
126126
expensive recalculations for each incoming request
127127
- Gorouters SHOULD NOT implement a distributed shared cache
128-
- The Gorouter MUST assess the current number of in-flight requests across all application instances mapped to a
128+
- Gorouter MUST assess the current number of in-flight requests across all application instances mapped to a
129129
particular route to consider overload situations
130-
- The Gorouter MUST update its local hash table following the registration or deregistration of an endpoint, ensuring
130+
- Gorouter MUST update its local hash table following the registration or deregistration of an endpoint, ensuring
131131
minimal rehashing
132132

133133
For a detailed understanding of the workflows on Gorouter's side, please refer to the [activity diagrams](#diagrams).

0 commit comments

Comments
 (0)