Comments (3)
As a reference, here is a simple comparison of performance from the same GRPC Server interacting with the same GRPClient:
Both tests use GRPCurl as a client.
Many GRPCurl requests, each one of them sending one message
grpcurl -max-time "0.1" -plaintext -d '
{
"requestHeaders": {
"attributes": {},
"headers": {
"headers": [
{
"key": ":authority",
"value": "'localhost:9090'"
},
{
"key": ":path",
"value": "/example"
},
{
"key": ":scheme",
"value": "http"
},
{
"key": ":method",
"value": "GET"
},
{
"key": "User-Agent",
"value": "'bot'"
}
]
}
}
}
' "localhost:9090" envoy.service.ext_proc.v3.ExternalProcessor.Process
rm *.log
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health01.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health02.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health03.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health04.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health05.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health06.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health07.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health08.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health09.log" &
timeout 200 bash -c "seq 1000000000 | xargs -I -- ./scripts/grpc-health.sh >> grpc-health10.log" &
seq 30 | xargs -I -- bash -c "sleep 10 && cat grpc-health*.log | grep PROCESSED | wc -l && date"
msgs | date |
---|---|
2274 | Wed 19 Jun 2024 15:19:49 AEST |
4540 | Wed 19 Jun 2024 15:19:59 AEST |
6713 | Wed 19 Jun 2024 15:20:09 AEST |
8837 | Wed 19 Jun 2024 15:20:19 AEST |
10784 | Wed 19 Jun 2024 15:20:29 AEST |
12799 | Wed 19 Jun 2024 15:20:39 AEST |
14495 | Wed 19 Jun 2024 15:20:49 AEST |
16399 | Wed 19 Jun 2024 15:20:59 AEST |
18285 | Wed 19 Jun 2024 15:21:10 AEST |
20096 | Wed 19 Jun 2024 15:21:20 AEST |
22173 | Wed 19 Jun 2024 15:21:30 AEST |
24303 | Wed 19 Jun 2024 15:21:40 AEST |
26251 | Wed 19 Jun 2024 15:21:50 AEST |
28175 | Wed 19 Jun 2024 15:22:01 AEST |
29851 | Wed 19 Jun 2024 15:22:11 AEST |
31919 | Wed 19 Jun 2024 15:22:21 AEST |
33756 | Wed 19 Jun 2024 15:22:31 AEST |
35807 | Wed 19 Jun 2024 15:22:42 AEST |
37931 | Wed 19 Jun 2024 15:22:52 AEST |
39311 | Wed 19 Jun 2024 15:23:02 AEST |
msgs | add | date |
---|---|---|
2274 | 15:19:49 | |
4540 | 2266 | 15:19:59 |
6713 | 2173 | 15:20:09 |
8837 | 2124 | 15:20:19 |
10784 | 1947 | 15:20:29 |
12799 | 2015 | 15:20:39 |
14495 | 1696 | 15:20:49 |
16399 | 1904 | 15:20:59 |
18285 | 1886 | 15:21:10 |
20096 | 1811 | 15:21:20 |
22173 | 2077 | 15:21:30 |
24303 | 2130 | 15:21:40 |
26251 | 1948 | 15:21:50 |
28175 | 1924 | 15:22:01 |
29851 | 1676 | 15:22:11 |
31919 | 2068 | 15:22:21 |
33756 | 1837 | 15:22:31 |
35807 | 2051 | 15:22:42 |
37931 | 2124 | 15:22:52 |
39311 | 1380 | 15:23:02 |
total msgs | total duration |
---|---|
37037 | 00:03:13 |
msg/second |
---|
192 |
One GRPCurl stream, sending many messages
#!/usr/bin/env bash
# grpcurl load messages
message='
{
"requestHeaders": {
"attributes": {},
"headers": {
"headers": [
{
"key": ":authority",
"value": "localhost:9090"
},
{
"key": ":path",
"value": "/example"
},
{
"key": ":scheme",
"value": "http"
},
{
"key": ":method",
"value": "GET"
},
{
"key": "User-Agent",
"value": "'bot'"
}
]
}
}
}
'
# ensure that each json object is on a single line
# that avoids the error on parsing partial messages during the timeout
line=$(echo "$message" | jq -c)
while true; do
echo "$line"
done
rm *.log
timeout 200 ./scripts/grpcurl-load-messages.sh | \
grpcurl -plaintext -d @ "localhost:9090" envoy.service.ext_proc.v3.ExternalProcessor.Process >> \
stream_result.log &
seq 30 | xargs -I -- bash -c "sleep 10 && cat stream_result.log | grep 'PROCESSED' | wc -l && date"
msgs | date |
---|---|
268251 | Wed 19 Jun 2024 15:51:45 AEST |
555624 | Wed 19 Jun 2024 15:51:57 AEST |
869601 | Wed 19 Jun 2024 15:52:10 AEST |
1210794 | Wed 19 Jun 2024 15:52:24 AEST |
1576059 | Wed 19 Jun 2024 15:52:40 AEST |
1983550 | Wed 19 Jun 2024 15:52:57 AEST |
2404755 | Wed 19 Jun 2024 15:53:16 AEST |
2879429 | Wed 19 Jun 2024 15:53:35 AEST |
3386229 | Wed 19 Jun 2024 15:53:58 AEST |
3918339 | Wed 19 Jun 2024 15:54:21 AEST |
4508434 | Wed 19 Jun 2024 15:54:48 AEST |
msgs | diff | date |
---|---|---|
268251 | 15:51:45 | |
555624 | 287373 | 15:51:57 |
869601 | 313977 | 15:52:10 |
1210794 | 341193 | 15:52:24 |
1576059 | 365265 | 15:52:40 |
1983550 | 407491 | 15:52:57 |
2404755 | 421205 | 15:53:16 |
2879429 | 474674 | 15:53:35 |
3386229 | 506800 | 15:53:58 |
3918339 | 532110 | 15:54:21 |
4508434 | 590095 | 15:54:48 |
total msgs | total duration | |
---|---|---|
4542905 | 0:03:03 | 122x more messages |
msg / second | |
---|---|
24825 | 129x faster! |
I have tested different combinations of number of clients process, but the results are quite similar.
The stream approach is much faster than the single message approach.
from envoy.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
from envoy.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
from envoy.
Related Issues (20)
- Hashing in xDS HOT 4
- pack_as_bytes doesn't work with Per-Route ExtAuthZ Filter HOT 2
- Improving ip tagging filter HOT 1
- MSAN issue in traceer_test_filter HOT 4
- Envoy does not respect DNS TTL when no max_connection_duration is configured HOT 6
- hot restart envoy HOT 5
- Use retry to work around ARM servers being reaped on AZP
- Stampede of DNS requests when TTL expires causes strain on upstream DNS servers HOT 6
- gcp_authn: Deprecation of http_uri breaks use cases where ?format=full must be used HOT 13
- //test/extensions/filters/network/rbac:integration_test flakily times out HOT 10
- TlsInspector filter chain HOT 1
- Newer release available `bazel_features`: v1.15.0 (current: v1.14.0)
- Newer release available `com_github_google_perfetto`: v47.0 (current: v45.0)
- Newer release available `rules_rust`: 0.49.2 (current: 0.35.0) HOT 1
- "Unable to locate package envoy": failed to install envoy in Ubuntu HOT 5
- How to build and got a small envoy binary? HOT 3
- redis_proxy: add support for external authentication HOT 2
- xDS ACK/NACK are not sufficient for data plane health monitoring
- RoleBasedAccessControlNetworkFilterIntegrationTest.DelayDenied is flaky HOT 2
- Why the HTTP filter will be destructed even when encodeData returns StopIterationAndBuffer? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envoy.