All Twitter Mobile Traffic Is Now Powered by Node.js(twitter.com)
twitter.com
All Twitter Mobile Traffic Is Now Powered by Node.js
https://twitter.com/necolas/status/829128165314306048
16 comments
[deleted]
anyone knows why it was done?
Wish they'd do a full write-up. I'd be interested in how they run their node processes.
[2] https://github.com/Unitech/pm2
- Using containers, VMs, bare metal?
- Using a process manager like Forever[1], PM2[2] or just native systemd?
[1] https://github.com/foreverjs/forever[2] https://github.com/Unitech/pm2
They probably will a bit later. Highly doubt that they use forever or pm2 tho.
Out of curiosity ( because we use pm2 here, and it works well ) why would you doubt them using those solutions?
Judging from their other infrastructure talks its far more likely they are shipping the application in a container to Apache Aurora, and having the process managed by Mesos.
I can't remember if all their services are now running on Mesos, but I'd bet their newer ones are.
I can't remember if all their services are now running on Mesos, but I'd bet their newer ones are.
Probably because it doesn't scale for their needs/fit rest of their system.
I'm impressed, it's very snappy.
why did not go for go
They seem to have done this only for Webpack (splitting JS libs + prefetching).
Why use Node at all? It's all static content...
Crazy that a top engineering post is about some company discovering "compile-time".
Next post will be about how they discovered this thing they call Testing?
Why use Node at all? It's all static content...
Crazy that a top engineering post is about some company discovering "compile-time".
Next post will be about how they discovered this thing they call Testing?
Most likely they include a bit of Server Side Rendering using the same templates they have in their compiled asset. Actually getting to share code here would be a pretty big win.
That's a bit harsh, don't you think?
Maybe they'll discover bootstrap ;)
I remember seeing Twitter switching from ruby/rails to the JVM for a lot of their backend a few years ago. I wonder why they're using node now (unless the mobile traffic was never moved to the JVM)?
https://www.infoq.com/articles/twitter-java-use
https://www.infoq.com/articles/twitter-java-use
I'm still confused.
Did they add a layer between their backend and mobile to pre-render the page server side, or did they get rid of their whole scala/jvm stack to replace it with Node?
Did they add a layer between their backend and mobile to pre-render the page server side, or did they get rid of their whole scala/jvm stack to replace it with Node?
My guess is they have a front with Nodejs for mobile.twitter.com and behind that you have all their scala/jvm microservices. Recoding all their microservices would be way too expensive. I don't think they use Nodejs for their RESTful API but I am curious to see more about that. Uber uses Nodejs for their GPS API so who knows...
ha, that would make sense!