11 karma · joined Nov 7, 2024 (2y ago) · 8 submissions
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
The dev who wrote that code probably didn't think too much about memory efficiency of proxying HTTP connections or case of streaming HTTP connections like SSE.
comment 1y ago · link · parent
> SSE works seamlessly with existing HTTP infrastructure:
I'd be careful with that assumption. I have tried using SSE through some 3rd party load balancer at my work and it doesn't work that well. Because SSE is long-lived and doesn't normally close immediately, this load balancer will keep collecting and collecting bytes from the server and not forward it until server closes the connection, effectively making SSEs useless. I had to use WebSockets instead to get around this limitation with the load balancer.