Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Yeah, at the moment it's hosted on one of my VPSs

do you do rate limiting, how do you protect your websocket?

nothing aside from just limiting the number of concurrent lobbies

Websocket is hard to scale. I couldnt decide should I buy a service or build my own backend on cloud but even on cloud there are many things to do load balancing, redis vpc. What do you recommend? 

I think that mainly depends on the load you expect. I mean, even the way it exists now in my sample code it could probably handle a couple hundred to thousand new games per minute without problem on a small VPS. The server component only helps set up the p2p connections, there is no real work involved.

So unless you're building something where you're literally setting up tens of thousands of new games per minute I wouldn't worry. Don't underestimate the scalability of a single executable on a cheap server. Spend your time/money on more important things.