#Bun.serve TCP SYN FLOOD

1 messages · Page 1 of 1 (latest)

ornate crater
#

That's not how tcp works

#

tcp handshake is a c->s syn, s->c syn+ack, and c->s ack

#

http(s) traffic only happens after that handshake

#

there's no such thing as a "tcp http packet"

#

http data are transmitted through regular tcp packets

#

for ddos prevention, try cloudflare

gilded axle
#

If the server is actually crashing, that is a problem

#

It shouldn't be possible to crash the server with any amount of traffic

ornate crater
#

it depends on the crash

#

if it's an out of resource issue, there's not too much bun can do except allow setting limits on connections (which it might already have, check the docs)

#

but a syn flood thing should be getting handled at the os level (which bun won't know about at all)

ancient marten
#

yeah that's what i was thinking too, bun doesn't implement TCP itself, it just uses your OS' underlying socket implementation

#

have you tried setting a timeout on your connections for your http server? that could help prevent crashes