Turning the database inside out
When I built my first cloud-native e-commerce system, I knew I had to break out of the relational database mold. It was reasonable to expect that I could use AWS RDS MySQL for the back-office users who would maintain the product catalog, but I would need something different to support the expected volume of customers reading from the catalog. I was already using Amazon S3 and Amazon CloudFront to serve SPA applications, with no concern for supporting any load volume. So why couldn't I do the same thing for the catalog data?
The catalog data was public, and it was static. Offers didn't change; they just expired and were replaced by new offers. I could put the images and offer JSON data into an S3 bucket with a path structure that supported good RESTful URLs, such as /merchants/123/offers/987/images/abc
, and set the cache-control
property on the objects so that CloudFront would serve the requests more often than not. I combined this with Amazon...