-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* direct port of cf server PoC from tx5 repo * make test * update deps * integrate with server-o-bahn suite * fix windows ts runner * ci fix * try through node itself * do we need to resume? * only run cf test on linux * protocol update * ensure message ordering through batching * concurrency fixes * rate limiting * cleanup * fmt * cleanup and comments * test2 different behavior * Update ts/sbd-server/server-o-bahn-runner.mjs Co-authored-by: Jost Schulte <jost.schulte@protonmail.com> * Update ts/sbd-server/src/index.ts Co-authored-by: Jost Schulte <jost.schulte@protonmail.com> * bad sig test * test 4 & 5 * msg-too-big * order stress * tweaks * address code review comments * cloudflare metrics * new test style * checkpoint * add dead state tracking to signal DO * cleanup * docs * Update ts/sbd-server/src/prom.ts * update * npm --verbose ci * npm install * older node --------- Co-authored-by: Jost Schulte <jost.schulte@protonmail.com>
- Loading branch information
Showing
23 changed files
with
1,639 additions
and
1,131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Cloudflare SbdServer | ||
|
||
## Metrics | ||
|
||
It's hard to get a sense of what is going on with distributed durable objects. To mitigate this, we are writing metrics to a KV called `SBD_COORDINATION`. These metrics can be enumerated from a central metrics http endpoint. However, as these metrics list IP addresses, and cause billable load on our worker kv endpoint, they will be guarded by an api key. | ||
|
||
### Set Api Key | ||
|
||
Set these api keys via worker secrets in the form: `METRIC_API_$(whoami)="$(uuidgen)"`. | ||
|
||
E.g. `METRIC_API_NEONPHOG=d6d38e16-9fe2-4cbf-b66d-e49775064d59` | ||
|
||
If doing this through the cloudflare dashboard, don't forget to click `encrypt`! | ||
|
||
Or you can use `wrangler secret put METRIC_API_NEONPHOG` and then paste in the uuidgen result. | ||
|
||
### Access the Metrics Endpoint | ||
|
||
`$(url)/metris/$(whoami)/$(uuidgen)` | ||
|
||
E.g. `https://sbd.holo.host/metrics/NEONPHOG/d6d38e16-9fe2-4cbf-b66d-e49775064d59` | ||
|
||
Should give you something like: | ||
|
||
``` | ||
# HELP client.count active client count | ||
# TYPE client.count guage | ||
client.count 4 | ||
# HELP client.recv.byte.count bytes received from client | ||
# TYPE client.recv.byte.count guage | ||
client.recv.byte.count{name="AqpAUD6QBb8lOfSBGna4C3tGAbI7E5slQ0MKkjm28kQ",opened=1720728911,active=1720728911,ip="no-ip"} 96 | ||
# HELP client.recv.byte.count bytes received from client | ||
# TYPE client.recv.byte.count guage | ||
client.recv.byte.count{name="R2qUfRVFfBhGGyxC4i_MorG48Ptk3JXwWvkIsh9mtRo",opened=1720728935,active=1720728935,ip="no-ip"} 96 | ||
# HELP client.recv.byte.count bytes received from client | ||
# TYPE client.recv.byte.count guage | ||
client.recv.byte.count{name="ia6EqgbobPhVrOdqlqZtL7v8EK5uDj5vlV4uTMB6vsY",opened=1720728936,active=1720728936,ip="no-ip"} 96 | ||
# HELP client.recv.byte.count bytes received from client | ||
# TYPE client.recv.byte.count guage | ||
client.recv.byte.count{name="u-JEHfSU6hArnHSjf9KA5W_ABH37go3Cm453UagScI8",opened=1720728911,active=1720728911,ip="no-ip"} 96 | ||
``` |
Oops, something went wrong.