In an ongoing effort to improve our Websocket API, we released a new upgrade to the ‘new-heads’ subscription type. We often receive questions from our users about Websocket subscription functionality, such as issues around keeping connections open, and consistency of responses. This update is specifically targeted at answering these questions and establishing the Infura Ethereum Websocket API as the most reliable way to utilize this interface for accessing Ethereum data.
Here are more specifics on the improvements to new-heads subscriptions,
- Fixes the 1 hour idle timeout that some users have reported with the Websocket endpoint.
- New-heads subscriptions will now provide data on reorged blocks which is not supported by Ethereum clients. This means that in the case of a chain reorganization, users will receive the new block headers for the updated chain.
- 100% consistent responses, no matter how many requests or the time of day, your response will always be consistent with previous or future responses.
The Websockets feature is still in Beta within the Ethereum clients. Infura is committed to supporting it for all our developers who need or use it. We will continue to release more improvements to Websockets and the Infura APIs, so stay tuned. Your feedback about Websockets has been incredibly valuable in enhancing the Infura service, please keep it coming!