Full-Site Delivery with Cloudfront

Cloudfront is a CDN designed for global content delivery. However, recent improvements allow it to act not only as a CDN, but also as a cache similar(ish) to Varnish.

People originally had to use Cloudfront by uploading their media to Amazon S3. Cloudfront then served those static assets from the S3 bucket. This means that within a coded application, developers needed to upload assets to S3 and then point URLs within their HTML (and perhaps in user-generated content) to a Cloudfront URL.

.. For instance, if you have a file example.com/css/styes.css, your Cloudfront URLabcxyz.cloudfront.net/css/styles.css will grab example.com/css/styes.css and then serve a cached version of that stylesheet for future visitors.

Within your own HTML, of course, you set the URL of styles.css to be your Cloudfront URLabcxyz.cloudfront.net/css/styles.css.

What Is Amazon CloudFront?

Further suppose that the web server from which you’re serving the image is in Seattle, Washington, USA, and that a user in Austin, Texas, USA requests the image. The traceroute list below (courtesy of www.WatchMouse.com) shows one way that this request could be routed.

WatchMouse

 

U.S. map

In this example, the request was routed 10 times within the United States before the image was retrieved, which is not an unusually large number of hops. If your user were in Europe, the request would be routed through even more networks to reach your server in Seattle. The number of networks and the distance that the request and the image must travel have a significant impact on the performance, reliability, and availability of the image.

Sharding a multi-tenant app with Postgres

Co-locating data within the same physical instance avoids sending data over the network during joins. This can result in much faster operations. With Citus there are a number of ways to move your data around so you can join and query it in a flexible manner, but for this class of multi-tenant SaaS apps it’s simple if you can ensure data ends up on the shard.

Bitnami

Bitnami makes it incredibly easy to deploy apps with native installers, as virtual machines, or in the cloud.

With one click, you can deploy any app or dev stack to any environment. Our images deploy consistently every time. All Bitnami apps and dev stacks have been pre-integrated and configured so that you can become productive immediately.