News for hackers. Stuff that matters.
Re:Does it scale? Who cares (2011) by hopfog on Sunday April 09, 2017 @03:25AM (#14070933)
I'm in the unfortunate position where this question actually matters from day 1. I learnt the hard way a few days ago when I hit the bottleneck (about 50-100 concurrent users) and I'm not sure how to proceed.

It's a multiplayer drawing site built with Node.js/socket.io. I'm already on the biggest Heroku dyno my budget can allow and it's too big of a task to rewrite the back end to support load balancing (and I wouldn't know where to start). Bear in mind that this is a side-project I'm not making any money of.

I had a lot of new features planned but now I've put development on hold. It's not fun to work on something you can't allow to get popular since it would kill it.

Re:Does it scale? Who cares (2011) by spacetexas on Sunday April 09, 2017 @04:22AM (#14071114)
Socket.io can't handle many connections you're right. I would use (universal) Web Sockets (This is a good abstraction library, very easy to implement).

https://github.com/primus/primus

Maybe put it on a Digitalocean Server and just reference your Dyno's IP address if possible.

Re:Does it scale? Who cares (2011) by hopfog on Sunday April 09, 2017 @06:45AM (#14071591)
Thanks! Looks good so that's definitely something I should look more into.
Re:Does it scale? Who cares (2011) by yxhuvud on Sunday April 09, 2017 @03:53AM (#14071012)
What is it your processor spends its time on? Perhaps those parts could be rethought and redesigned? Perhaps heroku is the wrong solution for those tasks even if it is good for the rest of the app. Would it be possible to find something cheaper for just those parts?
Re:Does it scale? Who cares (2011) by hopfog on Sunday April 09, 2017 @06:44AM (#14071587)
To be honest I haven't really benchmarked it. Maybe that's something I should invest time in to see if there's some obvious bottleneck I can fix. Thanks for the suggestion.
Re:Does it scale? Who cares (2011) by true_religion on Sunday April 09, 2017 @04:03AM (#14071044)
Heroku is fairly expensive. Could you not port this to a more dedicated server? Yes, it's likely complicates deployment but for a few hours of work in initial deployment, you can save hundreds of hours rewriting your codebase.
Re:Does it scale? Who cares (2011) by hopfog on Sunday April 09, 2017 @06:43AM (#14071585)
I'm thinking about it but I'm no server admin so it feels a bit scary. I could probably do it quite easily but it would be a security nightmare.
Re:Does it scale? Who cares (2011) by stevewilhelm on Sunday April 09, 2017 @04:11AM (#14071069)
I think what the author of the original article would suggest that you need to convert some of the concurrent users to paying customers and use the money to purchase additional Heroku dynos.
Re:Does it scale? Who cares (2011) by hopfog on Sunday April 09, 2017 @06:42AM (#14071580)
I don't think that's possible for me. I have some future monetization plans but that requires features I don't have yet. At the current state I have a hard time seeing anyone would pay for it. Also, due to how the back end is structured it's not possible to scale horisontally at the moment so all I could do with money is beefing up the current dyno, not adding more.
Re:Does it scale? Who cares (2011) by sah2ed on Sunday April 09, 2017 @01:04PM (#14073221)
> At the current state I have a hard time seeing anyone would pay for it.

You'll never know for certain until you try. You need to ask put a dollar sign and see how current users respond. Of course only a handful of users will pay, after which you can slowly ramp up prices as you build out the features you have planned.

Re:Does it scale? Who cares (2011) by Everhusk on Sunday April 09, 2017 @03:38AM (#14070968)
Hey, you might want to check out https://realm.io/ , the demo is exactly what you said. Good luck!
Re:Does it scale? Who cares (2011) by hopfog on Sunday April 09, 2017 @06:37AM (#14071559)
Looks cool but seems like it's aimed at mobile and not websites? Also, how do they differ from Firebase?

My previous experience with Firebase makes me hesitant to use a BaaS. It works great for simple stuff but as soon as you want more control it becomes a mess compared to just having your own server. It might just be me who haven't wrapped my head around the mindset correctly though.

Re:Does it scale? Who cares (2011) by weitzj on Sunday April 09, 2017 @04:05AM (#14071048)
Maybe you could rely on Firebase for the real-time db stuff and do the drawing there.
Re:Does it scale? Who cares (2011) by hopfog on Sunday April 09, 2017 @06:32AM (#14071542)
I actually used Firebase for the first version but ran into a lot of different issues, mostly due to the lack of control. That's why I migrated to my own Node server where I could have my own back end logic to control things.

This was many years ago though so maybe I should have a look at it again.