Performance mantras

Leon Fayer
Web Performance for Developers
2 min readNov 3, 2017

--

Lhassa, Tibet © Leon Fayer

Rules of web application performance

Performance != Scalability

Those two concepts are not two of the same, even though they are often used in conjunction when talking about web application performance. Best way to think about the difference is to think about the fast food franchises. Scalability is building more restaurants in the neighborhood to serve more people that are moving into the neighborhood. Performance is adding automated ordering system to streamline the process and serve more people in a single location. This is why cloud solves the horizontal scalability problem, but does not, in any way, solve the performance problem.

Performance is technology agnostic

It doesn’t matter if you’re a Ruby person or prefer Python. Whether you’re still using proven Apache or prefer to keep your code stack in JavaScript and using Node.js. Similarly, if the only database you’re familiar with is MySQL or you’ve had your hands on PostgreSQL, Oracle and even, dare I say, DB2. It doesn’t matter what the technology of choice is, the core principals and techniques to improve the performance are the same across the board. Actual implementation details (config tweaks, syntax, etc.) may slightly vary depending on technology, but the concepts stay true.

Performance is not a feature

Much like with security, you cannot add “performance” as a line item to your project plan. Performance impact should be considered at every step of design, architecture and development. Because of the cascading nature of performance problems, early omission of performance considerations can cause major outages. Remember, not all the performance problems can even be tested for in development/staging environment. Some can only be observed in production.

Performance is subjective

That said, don’t over engineer for the results you don’t need. Keep in mind the effort vs reward trade off. Optimize for what’s needed and what’s acceptable. And remember:

Premature optimization is the root of all evil

— Donald Knuth

--

--

Leon Fayer
Web Performance for Developers

Technologist. Cynic. Of the opinion that nothing really works until it works for at least a million of users.