Skip to content

Conversation

stefangutica
Copy link
Collaborator

@stefangutica stefangutica commented Aug 20, 2025

Reasoning

  • Allow clients to subscribe to endpoints instead of performing multiple request to fetch updates

Proposed Changes

  • Integrate websockets subscription for transactions, blocks and stats

How to test

  • Use a client simulation script and subscribe to multiple endpoints with different parameters and multiple topics on each client
    Example:
    client1: subscribeTransactions with payload {from=0, size=10}, subscribeBlocks with payload {from=0, size=2}
    client2: subscribeTransactions with payload {from=0, size=2}, subscribeBlocks with payload {from=0, size=5}, subscribeStats

on each client you should only receive data the same as you would request that specific endpoint with those specific parameters and the server must perform only 1 computation per each room at a specific interval regardless of the number of clients in that room -> a room is unique by topic and payload (filter parameters)

@stefangutica stefangutica marked this pull request as draft August 20, 2025 13:49
Copy link

github-actions bot commented Aug 20, 2025

k6 load testing comparison.
Base Commit Hash: 91f20cc
Target Commit Hash: 5ceec0e

Metric Base Target Diff
AvgMax9095AvgMax9095AvgMax9095
Tokens60.77935.0464.7568.5559.09705.5163.0566.21-2.77% ✅-24.55% ✅-2.63% ✅-3.40% ✅
Mex60.37518.0764.7868.6358.49179.1963.0265.99-3.11% ✅-65.41% ✅-2.72% ✅-3.84% ✅
Pool60.531119.4464.8168.3458.77309.0263.0166.08-2.91% ✅-72.39% ✅-2.78% ✅-3.30% ✅
Accounts59.79245.9964.7468.6258.95513.0963.0066.07-1.41% ✅+108.58% 🔴-2.69% ✅-3.71% ✅
Nodes60.861097.3764.7768.0659.01640.7363.0466.02-3.04% ✅-41.61% ✅-2.67% ✅-3.00% ✅
Blocks68.50885.8966.0074.7067.681057.2263.7367.37-1.19% ✅+19.34% 🔴-3.45% ✅-9.81% ✅
Transactions76.31899.8566.5777.3575.31916.2664.4781.99-1.31% ✅+1.82% 🔴-3.16% ✅+6.00% 🔴
Test Run Duration60002.0860002.12

Legend: Avg - Average Response Time, Max - Maximum Response Time, 90 - 90th Percentile, 95 - 95th Percentile
All times are in milliseconds.

@stefangutica stefangutica marked this pull request as ready for review September 3, 2025 13:54
collectionPropertiesFromGateway: false
features:
websocketSubscription:
enabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make them disabled by default maybe? can be left as a TODO before PR's merging

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants