An average page is now over 1300 kB in size and over 60% of that is in images... WebP provides 30-80% improvement over JPEG and PNG - latest news and updates from WebP team, and example Varnish/Nginx configs for WebP detection.
Chrome gets faster as you use it. Chrome learns the topology of the web, browsing patterns, and critical resources on every page to optimize your browsing! A look under the hood of how it all comes together...
3 hour workshop on web performance from the ground up: what is fast, impact of latency and bandwidth, TCP performance, SPDY protocol, browser parsing and execution, rendering optimizations, critical path, and more.
If we really want to make an impact on web performance, then image formats is the place to do it. There is absolutely no reason why we shouldn't have dozens of specialized formats, each tailored for a specific case and type of image. But before we get there, we need to iron out some kinks...
Your browser is one of the most and best instrumented development platforms - you may just not realize it yet. Check out these videos to learn how to debug network, rendering, and javascript performance in Chrome, and also learn how to extend devtools with extensions, debugging protocol, and more!
With SSL + NPN support in HAProxy, adding SPDY support to your site has never been easier. A hands on look at the configuration to make it all work. You can now deploy a simple Ruby SPDY server without having to worry about SSL, or NPN!
mod_pagespeed is a just in time (JIT) performance compiler for the web. This free and open-source Apache module automates all of the most popular web-performance best practices by dynamically rewriting and optimizing your website assets. A look under the hood and the architecture of the module within Apache...
Hand's on look at the HTTP Archive data format, which allows us to export, analyze, and visualize network performance data from the network timeline... Learn how to build a performance dashboard in three easy steps, with free and open-source tools!
Modern browsers are much smarter than most give them credit for. Myth #1: All stylesheets block rendering; Myth #2: CSS is always in the critical path. A look at under the hood of how WebKit handles CSS loading.
Network latency is anything but free. To address this, Chrome learns the network topology as you use it via a number of predictor heuristics. Let's take a peek under the hood of the Chrome networking stack and see how this can be applied to building faster web apps.
RailsConf 2012 slides for Making the Web Fast(er) one Rails page at a time - tools and tips for optimizing your pages using a variety of Google tools (aka, the tools we use at Google to optimize our products).
Chrome's remote debugging allows you to easily drive the browser via a WebSocket: interact and modify the DOM, listen to network events, instrument the V8 VM, and much more! A hands on example of driving Chrome via Ruby + WebSockets.
If your job is to think about web performance, then you need to approach it from a users perspective: use Navigation Timing to measure true latency, leverage Site Speed reports in Google Analytics, and focus on the shape (distribution) of the performance data! A hand's on look at the spec, and sample GA reports.
JDK7's Fork/Join combines a double ended queue (deque) and a recursive job partitioning step to minimize synchronization - a great design pattern to keep in mind for single host and distributed cases! A look under the hood of the Fork/Join framework, and a few JRuby examples which will light up all of your available cores.
LevelDB combines the SSTable, MemTable a number of processing conventions to create a fast, open-source database engine. LevelDB is now embedded in WebKit (IndexDB), but you can also easily embed it in your own Ruby application!
WebSockets, SPDY, SSL, and persistent connections are in, except that our infrastructure can't support most of these use cases. To enable the modern, real-time web, we need to drag our 'back office' architectures into this century.
Google officially supports JavaScript, GWT, Closure, NaCl and Dart: how do these project play together, why the competition? What's the one true "Google" way to build a modern web application in 2012?
Don't "push" your pull requests - good work gets "pulled". Avoid the trap of working in the dark and being surprised when your contributions don't get merged.
Is it possible to securely route SSL sessions via an HTTP Proxy? A look at the existing HTTP specification, and what the SPDY spec and Google Chrome team bring to the table - hint, the answer is yes. As of January 2012, over 50% of all internet sessions will be SPDY capable, and Web-VPN is one of the many great features it brings.
For most web-browsing use cases, an internet connection over several Mbps offers but a tiny improvement in performance - don't waste your money on that high-bandwidth connection! Oh, and learn a few tips on how to build a faster web and web-services.
Do use reuse HTTP connections in your code? Does your app server support pipelining? You can speed up your code and your apps by orders of magnitude if you answer those questions correctly. A look at the HTTP internals, and Ruby libraries and solutions.
Server-Sent Events are an HTML5 feature which allows you to easily push real-time notifications from the server to the client! Why not use a websocket? Turns out SSE offers a much simpler API optimized for one way push. A quick look at an SSE API and a Ruby/Goliath server implementation.
Heroku's new Cedar stack allows us to deploy any ruby app to their cloud! Which means, we can now deploy async Goliath Ruby apps with near minimal effort: streaming API's, async API endpoints, etc, all without any of the callback mess!
VMware announced their CloudFoundry project earlier this week, which is an open source PaaS platform - run your own "mini Heroku" or "EY cloud" on your own servers! The entire platform is powered by a collection of distributed Ruby daemons and services - great case study of building a distributed Ruby system.
If you are using Google's Chrome broweer, and you are using Google web services today, chances are, you are not running over HTTP! More likely, you're running over SPDY. A look under the hood of SPDY and a Ruby parser for SPDY.
Goliath is an open source version of the non-blocking (asynchronous) Ruby web server framework powering PostRank. It is a lightweight framework designed to meet the following goals: bare metal performance, Rack API and middleware support, simple configuration, fully asynchronous processing, and readable and maintainable code (read: no callbacks).
HandlerSocket is a plugin for MySQL which adds the "NoSQL" directly into MySQL. End result? Direct access to your index, faster than memcached, and full power of SQL!
Ruby was influenced by languages such as Perl, Lisp and Smalltalk, and now it is influencing an entirely new set of languages such as Mirah, Reia and Rite.
ZeroMQ allows the programmer to assemble high-performance, in process fanouts, queues, and other messaging patterns required for building high-performance applications. ZDevice is a new Ruby library & DSL which simplifies this process.
If you ever needed to add text-indexing or search to your application, then Lucene & Solr should be on top of your radar. A detailed look at the ecosystem and current users of both projects.
ZeroMQ is a network library which provides a much needed layer of abstraction on top of the traditional BSD socket API: transport agnostic, connection management, routing. With language bindings for a dozen languages (and Ruby, of course), it is a fast, modern API which makes developing high-performance network apps fun again.
It's not a question of whether threads, events or message-passing is a better model - the hardware trends require that we use all of the above. Either the VM (like Ruby) has to abstract it all for us, or we need to build frameworks to match the capabilities of the hardware.
Rails 3 release is on the horizon, and Railtie is what ties all the new modules together. A look at how it works, and how it enables us to build super simple and easy plugins for Rails 3!
Google's Speed Tracer instruments the browser and the V8 VM to show you what the browser is doing: GC, reflow, etc, such that you can optimize the performance of your code. A recent feature is the ability to also bring in server-side traces! Rack-speedtracer is a middleware which allows any Rack compatible app to surface its runtime information in Speed Tracer.
CAP theorem says that we can't have consistency, availability, and partition tolerance all at once: pick two! How does that affect all of the NoSQL databases and our architectures? Well, it is far more nuanced than just pick any two.
The state of art in the end-to-end Rails stack performance is not good enough. We need to fix that, and to do so, we need to revisit our app server model, as well as everything that touches it.
Zookeeper is a distributed lock and metadata store originally incubated within the Hadoop umbrella of services. However, it is also generally useful for solving distributed problems, and is designed to be highly available and scalable -- a quick look at the architecture, API's, and working with it in Ruby.
Event driven programming does not have to be complicated. With a little help from Ruby 1.9 Fibers, and new library em-synchrony, much of the complexity is easily abstracted, which means that we can have all the benefits of event-driven IO, without any of the overhead of a thread scheduler or complicated code.
There is no reason why we can't have a schema-free MySQL engine to compete with the NoSQL solutions. A look at what "schema-free" and "document-oriented" actually means, and the ruby code to make it work.
Apache Avro is an RPC + data serialization library used by the Hadoop project (and a competitor to Thrift, Protocol Buffers, etc). A look at the Ruby interface and the features of Avro.
An in-depth look at the architecture of Ganglia (performance monitoring) for your cloud service / app, and how connect it to your Ruby application - a new gmetric gem.
MagLev Ruby VM has a unique persistence model: it is a database and a ruby runtime in one. Based on the smalltalk VM, it offers a JIT, transparent object persistence, distributed layer, and many other goodies. A on overview of the state, architecture and examples of use.
WebSockets are one of the most underappreciated innovations in HTML5 - bi-directional, fully asynchronous and data agnostic data exchange. Dev builds of Google Chrome, Firefox and Safari now all support WebSockets, which means that as developers we start taking advantage of the new architectures. A hands on look at the API, and implementation of Ruby WebSocket server and clients.
Nginx can be converted into a fully capable long-polling Comet server with a single plugin. Best of all, it is fully asynchronous, supports message queuing, memory limits, and is easy to get started with. A look at the configuration and a sample ruby client.
Google App Engine has all the potential to become a popular deployment platform for Ruby applications: Sinatra, Rack, Rails, etc! A look at the tools and gotchas of migrating to GAE.
Ensemble methods are proving to be very effective for doing collaborative filtering (product recommendations, etc) as the results from both the Netflix and the recent GitHub challenge clearly show. A look at what ensembles are, and how they can be used (in Ruby, of course).
Most web applications are built with the assumption that the client / browser is 'dumb', which places all the 'scalability' and load on the server. But, what if, the browser was smarter? A look at ReverseHTTP & WebSockets APIs.
Tokyo Cabinet/Tyrant database can be scripted via Lua extensions: inject new functionality, application or data logic, etc. A look at the available extensions (auto expiry, working with sets, wordcount map-reduce example) and how to get started (with Ruby).
Designing your application to work around IO bottlenecks is tricky business. A look at measuring & optimizing for I/O performance with iostat + a refresher on disk latencies and the underlying bottlenecks.
Building a high-performance Ruby proxy server is both remarkably simple, and a very powerful technique: intercepting arbitrary data, extending protocols & injecting new functionality, ... It's a wonderful hammer, learn how to use it!
Instead of using proprietary protocols, what if the barrier to entry for assembling a compute cluster was clicking a link? We can use the browser (javascript) to perform the work, and HTTP to coordinate the workflow. All we need is javascript and a 30 line sinatra web-server.
When you're working with large datasets it's always nice to have a few algorithmic tricks up your sleeve, and Bloom Filters are exactly that - often overlooked, but an extremely powerful tool when used in the right context. Learn the theory and get started with Bloom Filters in Ruby.
Scaling ActiveRecord with MySQLPlus and ConnectionPool: A hands on look at the new ConnectionPool interface in Rails 2.2RC1, and the MySQLPlus gem which promises asynchronous processing.