#Pulse on ECS

8 messages · Page 1 of 1 (latest)

maiden kraken
#

Hi gang, we've recently adopted Pulse, and noticed only upon deploying to production that our ECS containers cannot either .stream() or .subscribe to any of our models. Hunch is that Pulse is driven by a websocket under the hood, and that the ELB is to blame here. Do you have any recommended configurations for this deployment environment?

slate nymphBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

maiden kraken
#

Might be worth noting this is all working swimmingly in our local development environments over sst

hushed lion
#

Hey @maiden kraken 👋

You are correct, Pulse relies on Websockets internally to hold a persistent connection.

Are you using Fargate? From what I have seen containers can hold websocket connections. What error do you get?

maiden kraken
#

I've not been able to produce a meaningful error yet. I've added logging around the call to const stream = await prisma.model.stream({name: "foo"}) and cannot see evidence of it connecting (logs after that call do not print). Given that this works flawlessly in dev, are there any obvious networking settings I should be looking for, either on the container, the ELB, or VPC?

maiden kraken
#
  • container has an auto-assigned public ip
  • security group allows all inbound and outbound traffic
  • elb has stickiness turned on
maiden kraken
#

Reachability analyzer says the container's ENI can connect to your IP.

maiden kraken
#

I do see in the insights tab that we have performed 442628 reads in the last 24 hours, yet we've not seen any evidence of those in the client.