22 ms·
Say you kill connections after 1 second (pretty aggressive) and you can hold 1,000 connections open (that's a fair number of threads) All I have to do is creat
by blake8086 15y ago
Say you kill connections after 1 second (pretty aggressive) and you can hold 1,000 connections open (that's a fair number of threads)
All I have to do is create 1,000 connections per second and I'll hog all your thread resources. That's not too hard to do.
- wtallis 15y agoKilling connections after a full second has elapsed probably isn't at all aggressive in the context of a game server. If the connection is legit but takes a full second to send authentication info, then there's no hope for the game actually being playable over that connection.
- kpreid 15y agoDepends on the game. Minecraft is hardly twitchy, especially if you're building, not fighting; the client proceeds as if each action has already happened, so you don't have to wait for the roundtrip between actions.
- rdtsc 15y ago1 second might not be too agressive for initial log-in -- that is where the real problem he is trying to solve is. If the username + password are not unbounded strings, but say, fit in an array of a 100 chars, then you should expect to get that data a lot sooner than 1 second (maybe 200ms?). So then maybe you can handle 5K connections... Yeah you are right, this is still not as good as a good async framework but the point was that some smaller things can be tried before a complete re-write. It might just be good enough.