6 ms·
> If I would have built GoSnaps with a slower programming language or with a big framework, I would have required more servers. If I would have used something l
by 0xmohit 10y ago
> If I would have built GoSnaps with a slower programming language or with a big framework, I would have required more servers. If I would have used something like PHP with Symfony, or Python with Django, or Ruby on Rails, I would have been spending my days on fixing slow parts of the app now, or adding servers. Trust me, I’ve done it many times before.
> As said, GoSnaps uses NodeJS as the backend language/platform, which is generally fast and efficient. I use Mongoose as an ORM to make the MongoDB work straightforward as a programmer.
- smnscu 10y agoAlso, I only skimmed the article, but it seems like the heavy lifting of serving images is done by the Google infrastructure instead of the one server.
- drdaeman 10y agoThat's an odd part. I'm not there's anything substantial that prevents, say, Python+Flask (I see MongoDB and I haven't used it from Django, so avoiding the topic) from handling 600rpm on a machine where Node can. From what I got, all it does is processing messages and geospatial search queries - essentially merely passing those to the DB (which does the actual work) - so how come the runtime of the byte-juggling middleware layer even matters here?
- rawnlq 10y agoBoth nodejs and flask can barely hit 10k requests per second even if it doesn't touch database: https://medium.com/@tschundeee/express-vs-flask-vs-go-acc0879c2122#d993 https://medium.com/@tschundeee/express-vs-flask-vs-go-acc087...
- aato 10y agoOut of curiosity what would be a healthy RPS range? I've always assumed anything over 1000+ is acceptable.
- rawnlq 10y agoFor this application where he was getting "hundreds of requests per second" at 500M users, if he suddenly grew another 10x he would've had to start scaling horizontally instead of running on just one machine.
- thecatspaw 10y agoaccording to my work, anything above 10rps is fine.
- lmm 10y agoFor internal business apps - or even b2b tools - 10 is probably plenty. There's a lot of premature optimization around.
- minikomi 10y ago... if your web app is a fibonacci number generator..
- rawnlq 10y agoIn case it wasn't clear, I am saying 10k req/sec is low... (compared to go/java which is 5 times as fast)
- nathan_f77 10y agoI was skeptical too, but the guy has 500,000 users on a $100/mo server. It's not even up for debate anymore, Node.js is fast and scalable. You might not like MongoDB, but it also works.
- RubyPinch 10y agoit can still be up for debate Maybe a slow language doesn't matter too much when the majority of the work is conveying data back and forth from the database to the users
- Mithaldu 10y agoThe performance profile matters. 500000 users on an instagram type site create a COMPLETELY different kind of load compared to 500000 on a geo-enabled realtime many-to-many chat program.
- stevesun21 10y agoBasically, nodejs server just convert http request to MongoDB queries and pass the json results back (especially he turns plan json result off for MongoDB driver). I cannot even be convinced there is any job nodejs really works on except pass around the requests. Let me put this way, no matter what language or framework he use, spend 90% of his money on MongoDB is the win for this app.
- cloudjacker 10y agoNow all we need is an entirely new software stack that passes flatbuffers end to end since they are BETTER than json (rolls eyes)
- legohead 10y ago500,000 users doesn't mean anything. what's the requests/second?