emeraldpay/dshackle

A way to reduce amount of sync calls?

Closed this issue · 5 comments

Hey. Recently we have added a new upstream - Cloudflare eth gateway, which doesn't have WebSockets support. Upstream was configured as a fallback, and we didn't even use it. Nevertheless, 941,536 requests were made to this endpoint during the month. As I understand it, these were only requests for getting the status / current block.
Why so much? Is this expected? Is there a way to reduce the number of these kind of requests?

splix commented

How many instances of Dshackle do you have?

I mean, if Dshackle makes a check for every block to ensure that the upstream is good, then with a twelve second block time it's roughly 220K requests a months per instance.

How many instances of Dshackle do you have?

I mean, if Dshackle makes a check for every block to ensure that the upstream is good, then with a twelve second block time it's roughly 220K requests a months per instance.

2 pods (deployed to k8s).

You can now tune almost all of this in the latest version, e.g.:

      options:
        disable-validation: false
        validation-interval: 60
        validate-peers: false
        validate-syncing: true

https://github.com/emeraldpay/dshackle/blob/master/docs/reference-configuration.adoc#general-upstream-options

splix commented

Ah, yeah, forgot about this ticket. So it seems that those 940K requests is just normal checks. Like upstream validation (2 requests every 15 seconds before), plus head block check. That makes about that number for 2 instances.

That can be tuned now as @MysticRyuujin pointed out

Thank you! Will check new settings.