
All Twitter Mobile Traffic Is Now Powered by Node.js - akras14
https://twitter.com/necolas/status/829128165314306048
======
nodesocket
Wish 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
They probably will a bit later. Highly doubt that they use forever or pm2 tho.

~~~
Alan01252
Out of curiosity ( because we use pm2 here, and it works well ) why would you
doubt them using those solutions?

~~~
nemothekid
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.

------
alex_duf
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?

~~~
nazka
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...

~~~
alex_duf
ha, that would make sense!

------
fenollp
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?

~~~
maherbeg
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.

------
relics443
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)

------
midgetjones
I'm impressed, it's very snappy.

------
PunchTornado
anyone knows why it was done?

------
murali129
why did not go for go

