Category Archives: Optimization

[Video 299] Cory Benfield: You Don’t Care About Efficiency: Synchronous Code Is Dying

Most programmers like to make their code more efficient. Whether it’s improving our algorithms, adopting new languages, or just cleaning out old code, we want to make our programs run faster and use fewer resources. But in this talk, Cory Benfield tells us that the problem with much of our code has to do with the fact that we’re using blocking I/O, and that we could improve things dramatically if we were to use asynchronous code. Asynchronous I/O is an area of growing interest and development in several programming languages, including Python (especially the recently-released 3.5) and JavaScript in (ES6).

[Video 298] Wim Godden: When Dynamic Becomes Static: The Next Step in Web Caching Techniques

So,  your Web application is running slowly. Does this mean that you need to switch languages or frameworks? Buy (or rent) a larger server, or more servers? Start tinkering with the database calls? Perhaps — but it could be that a smart cache, aka an HTTP accelerator, will help you. Caches and HTTP accelerators are no longer as simple as they once were; they can be clever about static vs. dynamic content.  In this talk, Wim Godden describes ways in which Varnish and other accelerators work, but then describes where such systems are limited, and some advances that nginx has made in this direction.

[Video 276] Ilya Grigorik: Yesterday’s best practices are today’s HTTP/2 anti-patterns

HTTP/2 is here!  This new version of the Web’s most popular protocol is optimized for modern Web uses. Our networks are faster, our browsers are smarter, and our requirements are tougher than was the case when the previous version of HTTP was released. But it turns out that HTTP/2’s speed isn’t just a matter of switching out the old servers and switching in the new ones: The best practices that we developed for years, in order to make our Web sites fast and efficient, conflict in some ways with the ways in which HTTP/2 expects us to work. In this talk, Ilya Grigorik describes HTTP/2, and contrasts it with HTTP/1.x — less to understand the protocol itself, than to understand how it works.

 

[Video 274] Christian Joudrey: Scaling Rails for Black Friday and Cyber Monday

People love to say that “Rails can’t scale.” Perhaps Rails is more CPU and memory intensive than other frameworks (and languages), but Shopify has manged to create a successful, large-scale, scalable business based on Rails.  But even Shopify, with all of their experience, faces challenges — in particular, on the biggest shopping days of the year in the United States, known as “Black Friday” and “Cyber Monday.” How do they scale their servers to deal with this massive influx of traffic? In this talk, Christian Joudrey shares many of Shopify’s ideas and approaches.

[Video 269] Nirbhay Choubey: Galera cluster — Best practices

As your applications scale, you’ll likely find that your database is one of the major bottlenecks. There are a variety of options available for scaling a database server; one is master-slave replication, and another (but often trickier) is master-master replication. MariaDB, an open-source fork of MySQL, supports an add-on package known as MariaDB Galera Cluster, which offers a variety of replication options, including multi-master replication. How does it work? How do you configure it? And does this option apply to your needs? This talk, by Nirbhay Choubey, should provide you with most of the answers that you need.

[Video 268] Dave Temkin: Scaling the Netflix Global CDN

If you have a popular Web site, then you’re going to need to deal with scaling issues.  And one of the things that most popular Web sites do to handle such scaling issues is to add a CDN, or “content distribution network,” which increases the perceived speed to end usersand reduces bandwidth needs on the server. If you’re Netflix, then these issues are crucial to your business. In this talk, Dave Temkin describes how he helped Netflix to build a CDN using open-source tools, what problems they encountered, and what we can learn from what they’ve done.

[Video 257] Alex Gaynor: Fast Python, Slow Python

People often complain that dynamic languages such as Python execute slowly. Of course, Python (and similar languages) are generally unable to reach the execution speeds that we see and know in other languages. Why is this?  What makes Python slow, and what can make it fast — or at least, faster? In this talk, Alex Gaynor provides descriptions and comparisons of Python code with other languages, and talks about strategies that we can and should consider in order to speed up our Python programs.

[Video 250] Trevor Norris: High Performance JavaScript

As JavaScript becomes an increasingly pervasive part of the technical world, it’s important to squeeze as much performance out of it. If you’re running node.js on the server, then you want to maximize your server’s potential. And if you’re running client-side JavaScript, then you want to waste your users’ time and computer power as little as possible.  In this talk, Trevor Norris describes techniques (particularly on the server side) that JavaScript developers can use to reduce the footprint and execution time of their code.

[Video 241] Spike Brehm: Evolution Of Airbnb’s Frontend

AirBNB is a well-known Web application and business. They’re known not only for their business, but for a high-quality Web experience. How did AirBNB go from a small, simple, Web application with almost no serious front-end technologies to one that is using many of them, including some home-grown systems?   In this talk, Spike Brehm describes the ways in which AirBNB’s front end has changed over time, in order to handle scaling, usability, and maintenance.

[Video 221] Estelle Weyl: Mobile Web Performance

The Web is increasingly mobile; people are increasingly using phones and tablets, in addition to desktop computers.  We hear a great deal about how we thus need to take mobile devices into account in our development work — but “mobile” means much more than having a responsive site. We need to take mobile devices’ speeds, battery lives, UI, and sizes into account when considering our Web application performance. In this talk, Estelle Weyl tells us what Web developers need to know in order to develop sites that are high quality for mobile devices, as well as for the desktop.