3 ms·
There is always one thing that bites you because Cloudflare is different. I just built an AI game (sleuththetruth.com) and the primary reason it's so slow to pr
by brikym 6mo ago
There is always one thing that bites you because Cloudflare is different. I just built an AI game (sleuththetruth.com) and the primary reason it's so slow to prompt a new board is actually not because of AI latency. It's because CF workers have a limit of 6 connections (including spawned workers). There is no way to gulp down all the wiki images I want all at once. If I had put the backend on Railway I don't think I'd have this issue.
- vjerancrnjak 6mo agojust keep-alive it with pipelining, depending on the server, 100k+ RPS.
- kentonv 6mo agoYou can farm out the requests to a bunch of Durable Objects. Each DO will have a separate six-concurrent limit. And you can send unlimited concurrent requests to Durable Objects. (This is not an exploit, this is working as intended. The concurrency limit exists to prevent creating excessive connections from a single machine; farming to DOs means the requests are spread out.) Also note that as of recently, the concurrent limit applies only up to the point that response headers are received, not during body streaming.
- brikym 6mo agoGreat tip. I knew about #2 which still doesn't help me but #1 is nowhere in their docs!