At CartoDB is an open source stack that includes PostgreSQL, PostGIS, Mapnik and Leaflet. The hosted version enables thousands of users to make new and interesting maps everyday. With some of those users including Al Jazeera America, Twitter, and even online gaming platforms, we arent scaling for one popular webpage but for thousands of different ones each day. On top of that, maps arent constrained to a single filter, single style, or to a predefined zoom, CartoDB allows users to access the full power of a dynamic database from the front end. In this talk, Ill present the architecture decisions we have implemented that make it possible to turn PostgreSQL and PostGIS into components of a powerful real-time data visualization tool. These decisions cut straight through the CartoDB software stack, from PostgreSQL and PostGIS through our caching and tile services, and up through to our CartoDB.js library. Well talk about our on-demand tiling service, our caching strategy, and our implementation of the novel data format for Torque. Each of these areas has enabled our users to make user of entirely open source tools to create maps and services that scale, remain fast, and are beautiful.