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

Turning off the LAMP Hunter Loftis, Skookum Digital Works

mongodb
August 16, 2012
1.3k

Turning off the LAMP Hunter Loftis, Skookum Digital Works

When Skookum Digital Works investigated the massive project of re-architecting a large social media site, a common theme arose: their client wanted to experiment, but its LAMP stack was getting in the way. Too big, too heavy, too rigid. Manipulating one variable caused cascading effects, and broke something else. SDW proposed an uncommon, but increasingly popular, solution: a document-oriented database. Dozens of tightly-coupled relational entities could be decoupled into documents. Business logic could grow more flexible and less error-prone. This is the story of moving a large user-driven website from a LAMP stack to a node-mongodb stack: what went right, what went wrong, and everything in-between.

Speaker Bio: Hunter Loftis is the Director of Technology at Skookum Digital Works. At SDW, his team trains early in emerging technologies to provide experienced leadership when new tech is adopted. Today, SDW specializes in HTML5, responsive design, heavy JavaScript, node.js and other dynamic platforms.

mongodb

August 16, 2012
Tweet

Transcript

  1. Turning off the LAMP
    Hunter Loftis
    Director of Technology
    Skookum Digital Works
    Wednesday, August 15, 12

    View Slide

  2. Skookum who?
    Wednesday, August 15, 12

    View Slide

  3. Wednesday, August 15, 12

    View Slide

  4. Wednesday, August 15, 12

    View Slide

  5. Project X
    Wednesday, August 15, 12

    View Slide

  6. The Issues
    • 250 tables
    • $2,800/month to host
    • 5+ second page loads
    • “schema paralysis”
    Wednesday, August 15, 12

    View Slide

  7. Wednesday, August 15, 12

    View Slide

  8. Our Hypothesis
    Wednesday, August 15, 12

    View Slide

  9. Documents
    • Faster
    • ...for cheaper hosting.
    • ...and shorter loadtimes.
    • Simpler
    • ...and easier to change.
    • ...without breaking stuff.
    Wednesday, August 15, 12

    View Slide

  10. Results
    Wednesday, August 15, 12

    View Slide

  11. (onload: 774ms, DOMContentLoaded: 694ms)
    Wednesday, August 15, 12

    View Slide

  12. $24k/year (71%)
    projected hosting savings
    Wednesday, August 15, 12

    View Slide

  13. Wednesday, August 15, 12

    View Slide

  14. But...
    Wednesday, August 15, 12

    View Slide

  15. “... they basically had no idea what
    MongoDB was and do not support it at
    all.”
    Wednesday, August 15, 12

    View Slide

  16. “They've advised me that with MongoDB,
    the entire DB goes into RAM.”
    Wednesday, August 15, 12

    View Slide

  17. Developers will try to use
    mongo like SQL (at first).
    Wednesday, August 15, 12

    View Slide

  18. You will miss JOINs
    (sometimes).
    Wednesday, August 15, 12

    View Slide

  19. Not all data makes sense as
    documents.
    Wednesday, August 15, 12

    View Slide

  20. Keep it simple, and mongo
    will rock your world.
    Wednesday, August 15, 12

    View Slide

  21. Thank you.
    • skookum.com
    • @skookum
    • @hunterloftis
    • github.com/Skookum
    Wednesday, August 15, 12

    View Slide