Push prices or breaking news in real time with Server-Sent-Events

Stream responses to the browser while still receiving data from the origin and also saving it to cache. Great for spreading out server-sent-events streams to millions of users from a single source stream.

VCL

Use this solution in your VCL service (click RUN below to test this solution or clone it to make changes):

Compute

Use this solution in your Compute service:

  1. JavaScript
  2. Rust
This page is part of a series in the Real-time data use case.

User contributed notes

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)