-
Hello :) I saw this video recently (https://www.youtube.com/watch?v=oZtTut7QsZ8) and I was wondering why he mentions that SSE isn't good for production and that Redis would be a better Pub/Sub transport ? In this video (https://www.youtube.com/watch?v=WlFPm47NQa0) he demonstrates using Redis as a PubSub with GraphQL Yoga but then notes at the end that using a serverless environment would mess with that I was initially interested in using GraphQL Yoga using either AWS Lambda, Cloudflare Workers or Vercel Functions (or even in a SvelteKit project hosted on Vercel) Has anybody actually tried running SSE-based subscriptions on these hosting platforms ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
graphql-sse itself is completely server agnostic and as such can run in any JavaScript environment - including all that you have mentioned. However, I personally have no experience in this segment so I cannot give you a subjective answer. Redis is not a transport though, Redis is an in-memory database - it cannot be used as a user-facing transport. Users subscribing to a server over internet can either use SSEs or WebSockets (or some other proprietary transport for IoTs). I reckon that he is talking about Redis as an internal pub/sub mechanism for publishing subscriptions to servers, which then publish those to users (either over SSEs or WSs). I guess what he means by Redis being a tad more complex in serverless environments is because you have to keep a persisted connection to Redis in order to get notified; whereas, serverless environments are usually short-lived lambda functions. |
Beta Was this translation helpful? Give feedback.
graphql-sse itself is completely server agnostic and as such can run in any JavaScript environment - including all that you have mentioned. However, I personally have no experience in this segment so I cannot give you a subjective answer.
Redis is not a transport though, Redis is an in-memory database - it cannot be used as a user-facing transport. Users subscribing to a server over internet can either use SSEs or WebSockets (or some other proprietary transport for IoTs). I reckon that he is talking about Redis as an internal pub/sub mechanism for publishing subscriptions to servers, which then publish those to users (either over SSEs or WSs).
I guess what he means by Redis being a tad mo…