5 ms·
All Twitter Mobile Traffic Is Now Powered by Node.js
- nodesocket 10y agoWish they'd do a full write-up. I'd be interested in how they run their node processes. - Using containers, VMs, bare metal? - Using a process manager like Forever[1], PM2[2] or just native systemd? [1] https://github.com/foreverjs/forever https://github.com/foreverjs/forever [2] https://github.com/Unitech/pm2 https://github.com/Unitech/pm2
- romanovcode 10y agoThey probably will a bit later. Highly doubt that they use forever or pm2 tho.
- Alan01252 10y agoOut of curiosity ( because we use pm2 here, and it works well ) why would you doubt them using those solutions?
- lossolo 10y agoProbably because it doesn't scale for their needs/fit rest of their system.
- nemothekid 10y agoJudging 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.
- midgetjones 10y agoI'm impressed, it's very snappy.
- murali129 10y agowhy did not go for go
- fenollp 10y agoThey 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?
- helthanatos 10y agoThat's a bit harsh, don't you think? Maybe they'll discover bootstrap ;)
- maherbeg 10y agoMost 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.
- relics443 10y agoI 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
- alex_duf 10y agoI'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?
- nazka 10y agoMy 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...
- alex_duf 10y agoha, that would make sense!
- deleted 10y ago[deleted]
- PunchTornado 10y agoanyone knows why it was done?