Skip to content

Commit d458e42

Browse files
updated latency page (#508)
* updated latency page * a few minor copy edits
1 parent 207d120 commit d458e42

File tree

1 file changed

+71
-31
lines changed

1 file changed

+71
-31
lines changed

docs/sdks/faqs/latency.md

Lines changed: 71 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@ sidebar_position: 6
44

55
# Latency
66

7-
Eppo’s feature flagging architecture enables faster delivery of client-side web experiments. By leveraging a "dumb server, smart client" approach and utilizing the power of the Fastly CDN, Eppo offers low-latency feature flag evaluations and efficient updates.
7+
## Introduction
88

9-
### Architecture Overview
9+
Eppo’s feature flags leverage a "dumb server, smart client" approach. This, paired with using Fastly's Global CDN, allows Eppo to provide low-latency SDK initialization and near instantaneous evaluation of feature flag and experiment variations.
1010

11-
The Eppo feature flagging architecture is designed as a JSON delivery service. The server maintains a file containing feature flags and their corresponding assignment rules. The client downloads this file and determines which feature flags apply to its group.
11+
The system is designed as a JSON delivery service. Our CDN maintains a file containing feature flags and their corresponding assignment rules. The SDK client then downloads this file and determines what variant to apply for a specific subject (e.g., user).
1212

13-
Our architecture follows the "smart client" principle, offloading the evaluation work to the client-side SDKs. This approach requires initial development effort to implement new SDKs and update existing ones when new targeting rules are introduced. However, it allows us to tap into the resources of the Fastly CDN, benefiting from its global infrastructure and distributed caching capabilities.
13+
Offloading the evaluation work to the SDK means that once the SDK is initialized all evaluation happens locally, typically in under 1 ms. Further, if user context changes mid-session, there is no need to reach out to Eppo's servers to understand their new targeting eligibility. All of the targeting happens locally, so Eppo's SDK will always ensure users see the right experiment given their unique targeting attributes.
1414

15-
### Latency Considerations
15+
This page walks through some of the latency considerations associated with building a global feature flagging system, describes options for how to reach your internal SLAs, and presents performance benchmarks.
1616

17-
When it comes to feature-flagging services, latency is a crucial factor for client experiences. We distinguish between two types of latency:
17+
## Latency Considerations
1818

19-
1. **Evaluation Latency**: The time it takes for a client to determine which flag value applies to it.
20-
2. **Update Latency**: The time it takes for updated rules to reach the client.
19+
When it comes to feature-flagging services, latency is a crucial factor for end user experiences. We distinguish between two types of latency:
2120

22-
We have made architectural tradeoffs to optimize these latency factors. Instead of a "smart server" architecture that requires frequent server polling, Eppo prioritizes fast evaluations by accepting relatively slower updates.
21+
1. **Evaluation Latency**: The time it takes to determine which flag value applies for a specific subject (user).
22+
2. **Update Latency**: The time it takes for updated rules to reach end users.
23+
24+
Eppo's "smart client" approach allows us to give very impressive evaluation latencies (typically under 1ms), while still providing update latencies that satisfy internal SLAs for disabling problematic features.
25+
26+
This is in contrast to a server-side evaluation which requires frequent network requests each time a flag is evaluated, or a user's context changes.
2327

2428
### Leveraging the Fastly CDN
2529

@@ -29,32 +33,68 @@ The diagram below illustrates our architecture, where requests enter from the ri
2933

3034
![Feature flag architecture](/img/feature-flagging/latency-1.png)
3135

32-
This architectural choice allows us to achieve impressive latency figures. Let's explore the uncached and cached latency numbers to understand the client experience better.
33-
34-
### Uncached Latency
35-
36-
The following map displays uncached latency figures obtained using a generic latency testing tool. Clients can download the feature-flag file in less than a second from most locations worldwide.
37-
38-
![Uncached latency](/img/feature-flagging/latency-2.png)
39-
40-
### Cached Latency
41-
42-
The cached latency numbers provide a more representative view of typical client experiences. These numbers correspond to requests made within a couple of minutes after the initial request.
43-
44-
![Cached latency](/img/feature-flagging/latency-3.png)
45-
46-
Most regions, including the US, Europe, South Korea, and Australia, experience latencies under 100ms. Even in locations further away, latencies are generally below half a second. To put it into perspective, the ping time between New York and London is approximately 72ms. From the client's perspective, it appears as though Eppo's servers are distributed globally, even though they are physically located in the corn fields and cow pastures of Iowa.
36+
### Latency benchmark
37+
38+
This architectural choice allows us to achieve impressive latency figures. To understand initialization times around the world, we ran a benchmark with ~80 active feature flag using the open source tool Grafana k6. Two users (i.e., threads) executed 500 requests in a row. This is repeated for each region in GCP.
39+
40+
The table below shows the measured percentiles for each region, reported in milliseconds.
41+
42+
:::note
43+
These figures measure latency from the VMs used for the test, so they are data center to data center. These figures will not be representative of what an end-user would experience in the mentioned locations for each provider - those figures would be higher (due to having to traverse the open internet/low bandwidth connections).
44+
:::
45+
46+
47+
| **Region** | **Location** | **p50** | **p90** | **p99** |
48+
| ----------------------- | ----------------------------- | ----- | ----- | ---- |
49+
| africa-south1 | Johannesburg, South Africa | 2 | 2.4 | 5.1 |
50+
| asia-east1 | Changhua County, Taiwan | 15.4 | 15.8 | 19.7 |
51+
| asia-east2 | Hong Kong | 2 | 2.6 | 5.6 |
52+
| asia-northeast1 | Tokyo, Japan | 1.2 | 1.5 | 2.6 |
53+
| asia-northeast2 | Osaka, Japan | 9.9 | 10.1 | 13 |
54+
| asia-northeast3 | Seoul, South Korea | 2.8 | 4.2 | 4.9 |
55+
| asia-south1 | Mumbai, India | 24.8 | 35 | 35.6 |
56+
| asia-south2 | Delhi, India | 2.7 | 2.9 | 3.7 |
57+
| asia-southeast1 | Jurong West, Singapore | 2.3 | 2.8 | 4 |
58+
| asia-southeast2 | Jakarta, Indonesia | 19 | 19.9 | 29.3 |
59+
| australia-southeast1 | Sydney, Australia | 2.3 | 3 | 3.9 |
60+
| australia-southeast2 | Melbourne, Australia | 16.3 | 16.7 | 18.9 |
61+
| europe-central2 | Warsaw, Poland | 24.8 | 25 | 27.7 |
62+
| europe-north1 | Hamina, Finland | 3.4 | 4 | 6.1 |
63+
| europe-southwest1 | Madrid, Spain | 1.7 | 2.6 | 3.7 |
64+
| europe-west1 | St. Ghislain, Belgium | 5.2 | 5.8 | 7.3 |
65+
| europe-west10 | Berlin, Germany | 13.9 | 14.1 | 15.9 |
66+
| europe-west12 | Turin, Italy | 6.2 | 7.3 | 13 |
67+
| europe-west2 | London, England | 1.6 | 2.1 | 3.1 |
68+
| europe-west3 | Frankfurt, Germany | 1.4 | 1.8 | 2.7 |
69+
| europe-west4 | Eemshaven, Netherlands | 4.7 | 5.1 | 6.4 |
70+
| europe-west6 | Zurich, Switzerland | 5.6 | 6 | 7.3 |
71+
| europe-west8 | Milan, Italy | 1.5 | 1.8 | 2.7 |
72+
| europe-west9 | Paris, France | 1.8 | 2.9 | 3.9 |
73+
| me-central1 | Doha, Qatar | 126.3 | 126.8 | 130 |
74+
| me-west1 | Tel Aviv, Israel | 48.1 | 48.8 | 49 |
75+
| northamerica-northeast1 | Montréal, Québec | 9.3 | 10 | 13.3 |
76+
| northamerica-northeast2 | Toronto, Ontario | 1.8 | 2.2 | 2.9 |
77+
| southamerica-east1 | Osasco, São Paulo | 2.1 | 2.3 | 4.1 |
78+
| southamerica-west1 | Santiago, Chile | 1.1 | 1.4 | 2.4 |
79+
| us-central1 | Council Bluffs, Iowa | 12.6 | 12.9 | 14.2 |
80+
| us-east1 | Moncks Corner, South Carolina | 14.8 | 15 | 16.2 |
81+
| us-east4 | Ashburn, Virginia | 1.8 | 2.2 | 3.1 |
82+
| us-east5 | Columbus, Ohio | 12.2 | 12.6 | 17 |
83+
| us-south1 | Dallas, Texas | 1.8 | 2.3 | 3.3 |
84+
| us-west1 | The Dalles, Oregon | 8.1 | 8.4 | 10.6 |
85+
| us-west2 | Los Angeles, California | 1 | 1.3 | 2.3 |
86+
| us-west3 | Salt Lake City, Utah | 18.4 | 19.4 | 19.7 |
87+
| us-west4 | Las Vegas, Nevada | 7.9 | 8.2 | 9.6 |
88+
89+
Most regions experience latencies under 20ms. Even in locations further away, latencies are well below half a second. To put this into perspective, the ping time between New York and London is approximately 72ms. From the client's perspective, it appears as though Eppo's servers are distributed globally, even though they are physically located in the corn fields and cow pastures of Iowa.
4790

4891
### Update Latency
4992

50-
Update latency refers to the time required for updated feature-flagging rules (JSON file) to reach the clients.
51-
52-
For client side SDKs (Android, iOS, React, etc), the rules are updated each time the Eppo SDK is initialized, which should happen only one time per application lifecycle. If the SDK is initialized more than once during an application’s lifecycle, an exception is thrown.
93+
Update latency refers to the time required for updated feature-flagging rules (JSON file) to reach the clients. Most of Eppo's SDKs have built-in polling that is configurable at initialization. This makes it easy to set a desired update latency: simply set the polling cadence to reach your internal SLA for changes to go live.
5394

54-
For server side SDKs (Java, Node.js, Ruby, etc), the rules are first updated when the Eppo SDK is initialized, then again every 30 seconds for the duration of the application’s lifecycle.
95+
Some SDKs also offer a method to manually trigger a reload of configurations, allowing for a lot of flexibility in how to handle update latency.
5596

56-
### Conclusion
97+
## Conclusion
5798

58-
Eppo's feature-flag architecture offers a faster and cost-effective way to deliver client-side web experiments. By prioritizing client-side evaluation and leveraging the Fastly CDN, we achieve sub-100ms evaluation latencies while maintaining efficient update processes.
99+
Eppo's feature-flagging architecture is optimized for evaluation latency. Once the SDK is initialized (typically in under 20ms), all evaluation of flags happen effectively immediately. Eppo also provides flexibility in how to handle update latency, ensuring changes made in Eppo's UI reach end users within a specified time window.
59100

60-
For any further questions or assistance, please refer to the Eppo Feature Flagging Service documentation or reach out to our support team.

0 commit comments

Comments
 (0)