Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Shape of Node Architectures at Scale

Bd38b9183f8b841522dbd118ac99c024?s=47 Dan Shaw
February 27, 2013

The Shape of Node Architectures at Scale

Talk given to London Node Users Group. #LNUG

Bd38b9183f8b841522dbd118ac99c024?s=128

Dan Shaw

February 27, 2013
Tweet

Transcript

  1. The Shape of Node Architectures at Scale

  2. Daniel D. Shaw @dshaw

  3. I like to build things with Node

  4. Build Node Things • Storify • Spreecast • Node Knockout

    • Voxer • The Node Firm
  5. Do Less Well

  6. FP for Distributed Architectures

  7. What do I do? - your processes

  8. Evolutionary Shapes • ALL THE THINGS! • Generalization • Specialization

    • One Thing
  9. ALL THE THINGS Mixture

  10. ALL THE THINGS Easy to run, multi-process, single execution point.

  11. Generalization Not all apps need to aspire to be the

    next Facebook.
  12. Scale Will you really need it?

  13. Building and Planning Node.js application

  14. Generalization • Express + Socket.io + API • Website +

    API • Restify
  15. Am I doing too much?

  16. Trade-offs

  17. Trade-offs • Expensive loads limit conjoined services. • Impact of

    exceptions and crashes. • Deployment complexity. • Deployment isolation. • Evolve services independently.
  18. Dumb Clusters Simple Pooling

  19. Dumb Cluster • Static file server • Simple web sites

    • Minimal client/server • API server hosts
  20. Pooling Tools • Round Robin DNS • Varnish • Nginx

    • HAProxy • ...more node
  21. Pooling Tools • Substack - seaport, etc • Nodejitsu -

    node-http-proxy • Poolee - battle tested at Voxer
  22. Distribute Load Data store(s) have the definitive answers

  23. Smarter Clusters Session Affinity

  24. Sticky Sessions

  25. Smart Clusters (Consistent Hash Rings)

  26. Why? Complex interactions or data persistence

  27. Properties of Consistent Hash Rings • Deterministic • Change has

    minimal impact on determinism • Crunchy middle?
  28. House of Pain Complexity

  29. Right for the Task As simple as possible

  30. Thank You! <3 dshaw