4 ms·
Any not so expensive hosting options for sockets-based apps? Heroku? Digital ocean? AWS? Also, what are the limitations by the hosting provider regarding concu
by Entangled 9y ago
Any not so expensive hosting options for sockets-based apps? Heroku? Digital ocean? AWS?
Also, what are the limitations by the hosting provider regarding concurrent connections, data transfer, etc.
I am currently working on a poker app using free Heroku dynos but would like to have a budget in mind for when going live.
- synthmeat 9y agoOn DigitalOcean, I'm planning a following setup to launch: 1. $20 staging at all times, already live [1] 2. $20 static nginx 3. 3x$5 for socket servers on North America / Europe / Asia 4. $5 master server with WS connections to full mesh of socket servers / orchestration / future. All Debian. Have no clue what's Heroku like for that, but last time I've checked, it wasn't as good choice as DO was and is for me. [1] WARNING: might break at any time, by choice or not http://staging.munchies.io http://staging.munchies.io
- Entangled 9y agoThanks for the info. Good thing about turn-based games is that you send small packets to few players every few seconds, so they're not that intensive in memory/transfer. I hope having a thousand players in a room won't break my piggy bank. Later on I'll venture with chess, checkers and backgammon, all turn-based games.
- synthmeat 9y agoIn this oldie of mine [1][2][3], I used protobuf (with no dictionary), and basically only used real-time information to show other player make moves, in otherwise turn-based/async profile game. It's currently solely on single $20 DO droplet, so I hope no HN effect kicks-in. :) [1] https://bit.ly/ShowdownFacebook https://bit.ly/ShowdownFacebook (FB+Flash) [2] https://bit.ly/ShowdownApple https://bit.ly/ShowdownApple (iOS) [3] https://bit.ly/ShowdownGoogle https://bit.ly/ShowdownGoogle (Android)
- explodingcamera 9y agoFor that money you might as well get a beefy dedicated server that's multiple times as powerful and not have to worry about all these small servers.
- synthmeat 9y agoBut can I get 3 dedis in 3 data centers? I'd like to have that lest user experience suffers. I effectively get that with my setup. Maybe one day when I need it, and certainly evaluating at any point.
- dkersten 9y agoThe bottleneck likely isn't the server here, but geolocation. He has 3 Digital Ocean socket servers in three regions. A single dedicated server will only be in one region. For latency-sensitive applications like realtime games, having servers close to your users is a must.
- XCSme 9y agoI tried playing that game but it's almost unplayable on my machine. The input lag seems to be around 200-250ms (so there seems to be no client prediction). Is this how was it supposed to be? Also it's not nice that you didn't mention the demo contains a crypto miner...
- synthmeat 9y agoI work on it most of this afternoon, including now. Maybe you hit it at wrong time. I use it a lot for load testing, that's mostly why it's live. It did came with a WARNING. :/ Works like a butter for me on EU <-> US path. > Also it's not nice that you didn't mention the demo contains a crypto miner... Hopefully it turned on only for Desktop + Chrome and didn't drain your battery? I simply didn't think it'd come as surprise, considering context of the discussion.
- reednj 9y agoI host https://babbl.xyz https://babbl.xyz on DO with a single $10 server for the socket and the web, and a $10 server for mysql. This can support around 500 active players. I also did a more action asteroids clone (http://triangle-wars.com http://triangle-wars.com), and this would only support I guess 50 players on a $10 server. The limiting factor seems to be the number of packets / sec that need to be broadcast to all players. If each player is changing state 2/sec, and you have 50 players, then the sever needs to relay 100 packets/sec... Unlike some other comments in this thread, I didn't find JSON parsing to have any effect on performance.
- zurn 9y agoIf you want to trade off simplicity for lower costs or lower latency, you can also use WebRTC data channels that do p2p communication between the players.