WalletConnect v1.0 Infrastructure Improvements

Paul Stemmet
WalletConnect
Published in
2 min readMar 7, 2022

In early November 2021, we encountered a traffic spike of WalletConnect v1.0 protocol messages, which our existing infrastructure was unable to handle.

Since then, an effort has been undertaken to rewrite the backend service handling v1.0 traffic, to better serve WalletConnect v1.0 clients. I’m happy to share that this rewrite was successful, leading to significant improvements in latency and performance.

Top line stats

In August 2021, we had deprecated the bridge.walletconnect.org endpoint which used to be the default server for WalletConnect v1.0 clients. However, we still observe significant traffic being routed through this endpoint, so we used it to benchmark the performance of the rewritten service.

Latency-graph

We can see a drastic improvement between the two with (roughly) 60x less latency, 9x more throughput and 60x less messages being lost while under load. These are the summarized stats from about a month of uptime.

Stat-table

Deployment stage

We will be rolling out these changes to other bridge servers hosted by WalletConnect Cloud in three separate deployment stages:

  • 2022–03–07: Named bridges (uniswap.bridge, etc)
  • 2022–03–08: Numerics ([0–9].bridge)
  • 2022–03–09: Alphas ([a-z].bridge)

Notable changes

No backwards incompatible changes were made, however two changes are noteworthy:

  1. Error on invalid WebSocket connection upgrade has changed from a 400 (Bad Request) to a 405 (Method Not Allowed). This only happens when a HTTP request is made to the WebSocket endpoint that does not conform with RFC 6455.
  2. Message caching is now adaptive, and favors messages that have been successfully published to subscribers, which can substantially increase message cache time, but will drop messages that have not seen a subscriber faster than the previous versions.

Future Improvements

These improvements are part of a series of infrastructure changes we are working on at WalletConnect to provide the best user experience across the board.

The WalletConnect v2.0 clients will also see improvements in terms of performance and reliability on the relay servers in the future with this new message broker rewrite.

Our mission to continue to scale WalletConnect to millions of users is only getting started! 🚀

--

--