-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSM dapp, wallet poll RPC nodes rapidly #6870
Comments
test-watch-balances.js is WIP (#6807) to read
and all those goodies. cannot push to something in xstreamIt currently fails a la...
grr... somebody is monkeying with the stack trace. line 159 is With the JS debug console, I can see the offending |
interim approach: reduce polling frequency... perhaps something around the block time |
I'm observing that the default behavior is to jitter about every 2-4 seconds. We could maybe do every 8 seconds for a ~2-3x reduction in cost without much noticeable UX difference. A longer reduction might be poor UX if users see, for example, offers completing but their vault dashboard not updating for a long time. However, I think the real problem is these queries keep going as long as you have the window open. So, someone who incidentally has several tabs open for hours will rack up a lot of data transfer (I estimate 2 MB transferred per minute per It's probably best to just go straight for the websocket/long-polling solution. |
Actually, looks like Maybe we can just try 8 second jitters, only when |
nice work, @samsiegart and co! These fixes were measured to reduce requests by 90% and traffic by 97%, IIRC. @samsiegart please correct me if I'm off by much. |
@dckc Yes, that's about right. Depends on which UI, as not every request is going through this new library and some have more requests to batch, but enough that we're under the 2 qps norm. ========================= Dapp-inter RPC efficiency improvements, as measured on emerynet when using gov1 account with 9 open vaults... Old dapp-inter using casting/proofs: 2800 requests, and 3.8MB per minute New dapp-inter using batch queries: 36 requests and 150KB per minute A 98.7% decrease in QPS, and 96% decrease in bandwidth! |
Describe the bug
When using our wallet or PSM dapp, the browser makes a dozen or so requests per second to an RPC server.
@arirubinstein noted a cosmos community operational norm of <= 2 requests / second per client on RPC servers.
To Reproduce
This is from memory. IOU a more direct observation, including log exerpt.
Expected behavior
I gather from @michaelfig that there are plans for
@agoric/casting
to meanwhile support#6647 will reduce HTTP requests by half.
Platform Environment
mainnet / prod; any browser / os
IOU one example of all these details
git describe --tags --always
)Additional context
A community member trying out dapp-psm asked why it was making so many requests so rapidly, noting several requests per second in their browser console. (I thought they opened an issue, so this might be a dup.)
@samsiegart and @turadg and I have noted this in a couple recent PRs (back-links to follow).
Screenshots
IOU log excerpt
The text was updated successfully, but these errors were encountered: