Thursday, December 05, 2013

PayPal Switches from Java to JavaScript

PayPal Switches from Java to JavaScript:
"Running the test suite on production hardware, they concluded that the Node.js app was performing better than the Java one, serving:Double the requests per second vs. the Java application. This is even more interesting because our initial performance results were using a single core for the node.js application compared to five cores in Java. "

The node.js app was:
  • Built almost twice as fast with fewer people
  • Written in 33% fewer lines of code
  • Constructed with 40% fewer files
Node.js at PayPal | PayPal Engineering Blog
Node.js vs Java performance graph
...node.js application had:
  • Double the requests per second vs. the Java application. This is even more interesting because our initial performance results were using a single core for the node.js application compared to five cores in Java. We expect to increase this divide further.
  • 35% decrease in the average response time for the same page. This resulted in the pages being served 200ms faster— something users will definitely notice.

Survival, "The Netflix way"

How Netflix Architects for Survival: @ InfoQ

The Netflix way:
  • Everything is “built for three” (i.e. VMs, data centers, etc.)
  • Fully automated build tools to test and make packages
  • Fully automated machine image "bakery"
  • Fully automated image deployment
  • Independent teams responsible for both Dev and Ops
  • Redundancy through multi-region deployment
Culture of "Freedom and Responsibility"

Automate all the things!

Shared state should be stored in a shared service

RESTfull services APIs (has its own CDN)

Highly aligned, loosely coupled (SOA)

All systems choices assume some part will fail at some point.

Reliability and $ (balance)

The Monkey Theory

  • Simulate things that go wrong (automation, tool "ASGARD")
  • Find things that are different
Execution
  • Running a new and old version clusters (instead of instances) in parallel, until stable
"Baking VMs" means no configuration at startup time, it is fully ready to run when started.