Kubernetes on AWS: How to Connect to RDS

Hey there! It’s time to write a new blog post about something really hot — Kubernetes. In order to make this article even spicier, I want to talk about Kubernetes in terms of AWS and access to a database. So basically this post is for those of you who want to set up a Kubernetes application on Amazon Cloud and configure access to RDS (Postgres/MySQL) from the application. Let’s get started!

A long time ago, the software development world was taken by storm with the concept of containerization. Since that time, every backend developer should know what is Docker and how to use it. That was only the beginning of something bigger. Today, I can definitely say that containers without proper orchestration and service discovery mechanism are pretty useless. Here is where Kubernetes comes in.

Introduction to Kubernetes Pod Networking, Part 1

The Ultimate Guide to Kubernetes Networking on AWS

In this three-part series, we deep dive into the Kubernetes Pod networking options on Amazon, and provide a bit of guidance around the various trade-offs involved in selecting a particular Kubernetes Network technology for your cluster on Amazon.  

If you are looking for an intro to Kubernetes, please have a look at our recent article "What is Kubernetes and Why It's So Popular."

AWS Networking Overview, Part 2

In this three-part series, we deep dive into the Kubernetes Pod networking options on Amazon, and provide a bit of guidance around the various trade-offs involved in selecting a particular Kubernetes Network technology for your cluster on Amazon. Please see here for Part 1. 

The other part to understanding networking on Kubernetes running on Amazon is the underlying Amazon network technology. AWS started out with a simple flat network, but due to customer demand for segmented networks, and to provide a more full-featured network implementation, it now includes VPC (virtual private cloud).

How AWS Control Tower Lowers the Barrier to Enterprise Cloud Migration

Scaling AWS cloud migration to the enterprise just got a whole lot less scary. Let’s give a warm welcome to AWS Control Tower.

If there was one announcement at AWS re:Invent 2018 that made us do the happy dance for our enterprise clients, it was the announcement of AWS Control Tower. It’s a new central control center that allows enterprises to have a single jump-off point for multi-AWS account management across teams, departments, and international borders.

Getting Started With DynamoDB and Spring

DynamoDB is a NoSQL database provided by AWS, and in the same way as MongoDB or Cassandra, it is very suitable to boost horizontal scalability and increase development speed.

Main Features

  • Fully managed NoSQL.
  • Document or Key-Value.
  • Scales to any workload. DynamoDB allows you to auto-scaling, so the throughput adapts to your actual traffic.
  • Fast and consistent.
  • Provides access control.
  • Enables Event Driven Programming.

Components

  • Tables. Catalog
  • Items. Group of attributes
  • Attributes. Data elements
  • Partition Key. Mandatory, Key-Value access pattern. Determines data distribution
  • Sort Key. Optional. Model 1:N relationships. Enables rich query capabilities
DynamoDB Components

Guidelines

  • Understand the use case.
    • Nature of the application.
    • Define the E/R Model
    • Identify the data life cycle (TTL, Backups…).
  • Identify the access patterns.
    • Read/Write workloads.
    • Query dimensions.
  • Avoid relational design patterns, and instead, use one table to reduce round trips and simplify access patterns. Identify Primary Keys and define indexes for secondary access patterns.
  • Select a strong Partition Key with a large number of distinct values. Do not use things like Status or Gender. Use UUID, CustomerId, DeviceId...
  • Items are uniformly requested and randomly distributed.
  • Select Sort Keys which follows a model 1:n and n:n relationships.
  • Use efficient and selective patterns for Sort Keys. Query multiple entities at the same time to avoid many round trips.

The official DynamoDB documentation for best practices provides more information.

Getting Started With Amazon’s New Well-Architected Tool

On the 29th November 2018, Amazon introduced the Well-Architected tool. With the help of this tool, AWS users can access their planned architectures vis-a-vis the latest AWS architecture best practices. In addition, AWS users can get guidance on improving their present application architectures. This tool is based on the increasingly popular Well-Architected framework which helps users build secure, high performance, resilient, and efficient AWS-based solutions. This tool provides a consistent approach for users to evaluate planned and existing architectures and provides guidance to help implement designs that scale in accordance with application needs.

Importantly, with the help of this tool users get insights on potential security risks and identify steps to address these risks via the Well-Architected framework. The tool guides the user through a series of question and answers covering different aspects of the five pillars of the AWS Well-Architected framework (namely, operational excellence, security, reliability, performance efficiency, and cost optimization) and at the end gives you a set of recommendations for the architecture. The Well-Architected tool is freely available to all users but is only available in US East (N. Virginia), US East (Ohio), US West (Oregon), and Europe (Ireland).