Conversation
|
Codecov Report
@@ Coverage Diff @@
## develop #1638 +/- ##
========================================
Coverage 76.52% 76.52%
========================================
Files 82 82
Lines 3041 3041
Branches 466 466
========================================
Hits 2327 2327
Misses 714 714
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
|
Do you mind moving this into the |
rpc-proxy/server.go
Outdated
There was a problem hiding this comment.
Do you think that it would be easy to add some sort of fallback/retry logic? One common problem is that we send a request to one eth api provider and they are down and then we want to fall back to another eth api provider. This would prevent losing a connection to L1
There was a problem hiding this comment.
Got it. Will update to retry the next backend in the list on failure rather than retry the current one.
|
Could you add this to the top level Line 7 in fc0616e |
|
Code standards & structure
Are there any additional features we'd like to add?
What does everyone think of the routing config? Is it flexible enough for our needs?
|
tynes
left a comment
There was a problem hiding this comment.
Left various comments requesting changes, will re-review when pinged
go/proxyd/proxyd.go
Outdated
There was a problem hiding this comment.
Realizing that this could leak API keys in the base_url since infura puts the api key in the path
tynes
left a comment
There was a problem hiding this comment.
Generally looks good to me
|
Release configs are set up now. |
|
Do you mind rebasing into a couple of commits and then I think this is ready for merging |
76f7967 to
77ba3c4
Compare
|
Rebase done. |
|
Oh wait you mean squash the commits, my bad. 1 moment. |
77ba3c4 to
3ec03a2
Compare
|
Ok, done for real this time. |
Description
Adds a replacement for the Lua-based Nginx RPC router.
Additional context
The Lua-based router isn't flexible enough for our needs, so I offered to rewrite it in Go. This rewrite offers the following additional functionality over what we had before:
I've included a full README as well as an annotated config file for reference. Below, I've excerpted the most important bits from the readme to make review easier:
Defining RPC routes in config:
Exposed metrics:
proxyd_backend_requests_totalproxyd_backend_errors_totalproxyd_http_requests_totalproxyd_http_request_duration_histogram_secondsproxyd_rpc_requests_totalproxyd_blocked_rpc_requests_totalproxyd_rpc_errors_totalRequested feedback:
Next steps:
If this PR looks good, I'll add some unit tests and do some load testing on a GCP instance. Once that's done I'll add it to k8s with Ben's approval.