Continue with my previous post. Now it is about phase #3. Theoretically, it should be very straightward. All Nginx needs to do is just fowarding the Akamai reqeusts to the upstream. Right? But in real life, whatever can go wrong will go wrong 😦 In the testing, we always get '502 Bad Gateway' error. I … Continue reading Nginx upstream key exchange issue
Akamai protocol rewrite issue
I have been working on a API gateway project (Akamai + Nginx + Lua) for quite a few weeks. There are lots of things that I would like to write and share. This post is one of them. The high level architecture looks like this: Phases: Users send http(s) GET or POSTÂ requests to Akamai. Akamai … Continue reading Akamai protocol rewrite issue
Bamboo plan for AWS build part 4
Swap URL: This is for blue/green deployment. The idea is to update the floating DNS to point to different stack's ELB CNAME. It allows us to easily divert the traffics to different backend stack, but keep it transparent to users. Cloudformation snippet "Resources": { "Route53DNSRecord": { "Properties": { "Comment": "Floating DNS Record", "HostedZoneName": { "Fn::Join": … Continue reading Bamboo plan for AWS build part 4
Bamboo plan for AWS build part 3
Continue with the Bamboo plan for AWS build, now it is time to look into the deployment plan. For each environment, I got 4 sub plans: Create Stack, Deploy Config, Swap URL and Delete Stack. Create Stack: As explained in the part 1, Stack means the infrastructure. e.g A Nginx stack has those components: ELB, Autoscaling … Continue reading Bamboo plan for AWS build part 3
Bamboo plan for AWS build part 2
Let's take a closer look at the build plan. It has four stages, and the names are self explanatory. Checkout - Check out the source code from one or more repositories. Package - Build the code or create a package of the binaries then share them as artifacts. Bake - Create new AMI. Share - Share the AMI … Continue reading Bamboo plan for AWS build part 2