Pitfall Thinking you dont have to worry about performance because 3 tier apps

Pitfall thinking you dont have to worry about

This preview shows page 481 - 483 out of 517 pages.

Pitfall: Thinking you don’t have to worry about performance because 3-tier apps using cloud computing will “magically” scale. This isn’t really a fallacy, because if you’re using well-curated PaaS, there is some truth to this statement up to a point. However, if your app “outgrows” PaaS, the fundamental problems of scalability and load balancing are now passed on to you. In other words, with PaaS you are not spared having to understand and avoid such problems, but you are temporarily spared from rolling your own solutions to them. When you start to set up your own system from scratch, it doesn’t take long to appreciate the value of PaaS. Fallacy: Processor cycles are free since computers have become so fast and cheap. In Chapter 1 we argued for trading today’s extra compute power for more productive tools and languages. However, it’s easy to take this argument too far. In 2008, performance engineer Nicole Sullivan reported on experiments conducted by various large SaaS operators about how additional latency affected their sites. Figure 12.17 clearly shows that when extra processor time becomes extra latency (and therefore reduced responsiveness) for the end user, processor cycles aren’t free at all. Activity Added latency Measured effect Amazon.com page view 100 ms 1% drop in sales Yahoo.com page view 400 ms 5–9% drop in full-page traffic Google.com search results 500 ms 20% fewer searches performed Bing.com search results 2000 ms 4.3% lower revenue per user Figure 12.17: The measured effects of added latency on users’ interaction with various large SaaS apps, from Yahoo performance engineer Nicole Sullivan’s “Design Fast Websites” presentation and a joint presentation at the Velocity 2009 conference by Jake Brutlag of Google and Eric Schurman of Amazon. Pitfall: Optimizing without measuring. Some customers are surprised that Heroku doesn’t automatically add Web server capacity when a customer app is slow ( van Hardenberg 2012 ). The reason is that without instrumenting and measuring your app, you don’t know why it’s slow, and the risk is that adding Web servers will make the problem worse. For example, if your app suffers from a database problem such as lack of indices or n + 1 queries, or if relies on a separate service like Google Maps that is temporarily slow, adding servers to
Image of page 481
accept requests from more users will only make things worse. Without measuring, you won’t know what to fix. Pitfall: Abusing continuous deployment, leading to cruft accumulation. As we have already seen, evolving apps may grow to a point where a design change or architectural change would be the cleanest way to support new functionality. Since continuous deployment focuses on small incremental steps and tells us to avoid worrying about any functionality we don’t need immediately, the app has the potential to accumulate a lot of cruft as more code is bolted onto an obsolete design. The increasing presence of code smells (Chapter 9 ) is often an early symptom of this pitfall, which can be avoided by periodic design and architecture reviews when smells start to creep in.
Image of page 482
Image of page 483

You've reached the end of your free preview.

Want to read all 517 pages?

  • Spring '19
  • Dr.Marcos

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors