This is Part 4 in an 7-part series discussing the www.tomammon.net online resume application. Check out the architectural overview for some context, or see the links at the end of the article to navigate to other posts in this series.
In this post we’ll see the role that public cloud plays in the application. The majority of the business logic that powers www.tomammon.net runs in private facilities. However, it makes sense (as is the case in many modern applications) to run part of it from the public cloud. Here’s the strategic view of the application again:
The biggest cloud component of the application is the DNS Service.
Amazon’s Route53 is used to provide name services. Route53 is authoritative for tomammon.net. Global site redundancy for the application is provided by populating a single A record with the public IP addresses of each Content Node to create a round-robin DNS entry. Two content nodes are currently in service, as shown here:
[tom@tomcloudhost ~]# dig www.tomammon.net
; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7 <<>> www.tomammon.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35880
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www.tomammon.net. IN A
;; ANSWER SECTION:
www.tomammon.net. 299 IN A 18.104.22.168
;; Query time: 37 msec
;; SERVER: 22.214.171.124#53(126.96.36.199)
;; WHEN: Mon Apr 09 23:38:57 EDT 2018
;; MSG SIZE rcvd: 77
The TTL for these records is set low at 300 seconds, to allow for changes in the recordset to propagate quickly. This approach has some major flaws, which we’ll discuss in Part 6: The Ugly Bits. Also, in Part 5: Operational Intent, I’ll show how the AWS API is used to make these DNS records responsive to the health of the application.
Some of the static assets (such as my profile picture image) for the site are located in an Amazon S3 bucket, which is called via the tomammon.com domain:
<link href='http://fonts.googleapis.com/css?family=Rokkitt:400,700|Lato:400,300' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
<div id="cv" class="instaFade">
<div id="headshot" class="quickFade">
It’s pretty painless to set up a simple static website on S3. All of the dynamic components of the application are located in private compute facilites for www.tomammon.net, so I’m only using public cloud for very specific parts of the application, which keeps the costs quite low.
- Part 1: Overview and Context
- Part 2: Network Infrastructure
- Part 3: Services Infrastructure and Application Code
- Part 5: Operational Intent
- Part 6: The Ugly Bits
- Part 7: What I’ve Learned
- Hosting a Static Website on Amazon S3
- Example: Setting up a Static Website Using a Custom Domain
- How Do I Configure an S3 Bucket for Static Website Hosting?