We host beautiful imagery tiles — it’s easy to get lost in their visual qualities — and we do it using an efficient image processing pipeline. Imagery tiles served by Mapbox benefit from efficient compression, fast compositing, and a resilient architecture that you can count on to serve lots of data, quickly, to as many people in as many places as you need.
Here’s what we’ve done to make that possible:
Compression
The first step to hosting fast imagery tiles is making sure that we serve an appropriate amount of data. While we accept a wide variety of input formats, we serve all of our tiles as PNGs and JPEGs, processed with optimizing compressors. As a developer, you choose exactly how much compression to use in your app:
Format | PNG | JPEG | JPEG at 70% |
---|---|---|---|
Filesize | 20 KB | 24 KB | 16 KB |
We also serve each tile in a retina-optimized format that is 2× the size of a standard tile and looks great on high-density displays.
Compositing
The next step in producing fast imagery tiles is taking layers that are served together and combining them into single images. Fewer distinct tilesets means less data to transmit, and that means more responsive maps.
In the past, loading a satellite basemap with labels (such as streets and placenames) would mean serving at least two distinct tilesets, one on top of the other. This method is fine for testing and light use, but it makes the client’s browser manage many HTTP requests and many rendering operations. Compositing does the rendering on the server side, thus consolidating HTTP requests. The result looks the same, but with less bandwidth, less lag, and less battery drain on mobile devices.
Architecture
Underneath this all is a stable, resilient platform that you can count on to process and serve your tiles around the clock. Our core server infrastructure is in nine locations across five continents. We’re near your users, wherever they are — an important part of how we deliver maps quickly. We’re also protected from failures associated with highly centralized architectures. As demand changes, our infrastructure dynamically scales — making sure that we continue to serve imagery efficiently. On top of that all, we’ve got an incredible team of engineers monitoring our infrastructure 24/7/365 to make sure that things continue to run smoothly.
We’re serving lots of data, we’re doing it quickly, and we’re going to keep on getting better.