Active-Active Shared-Nothing Database Architecture

Choosing the right pattern for the right case

Arup Nanda
Nov 2, 2020 · 20 min read
image in shade of blue of 2 men on opposite cliffs with ladders looking at each other

Preamble

Getting the Basics

depiction of AASN with orange squares, blue cylinders, and black arrows
depiction of AASN with orange squares, blue cylinders, and black arrows

State of the Application

Traditional Approaches

traditional view of an APSN architecture with orange squares and blue cylinders
traditional view of an APSN architecture with orange squares and blue cylinders
traditional view of an APSN architecture with orange squares and blue cylinders. red X on left side of diagram
traditional view of an APSN architecture with orange squares and blue cylinders. red X on left side of diagram

Brown-Out Period

Hot Standby

traditional view of an APSN architecture with orange squares and blue cylinders.
traditional view of an APSN architecture with orange squares and blue cylinders.
view of an aasn database with orange squares and blue cylinders
view of an aasn database with orange squares and blue cylinders

CAP Theorem

venn diagram made of overlapping orange, blue, and green circles and black text
venn diagram made of overlapping orange, blue, and green circles and black text

Eventually Consistent State

diagram made of yellow rectangles and orange, blue, and green cylinders and black text
diagram made of yellow rectangles and orange, blue, and green cylinders and black text

Conflict Resolution

diagram made of yellow rectangles and orange, blue, and green cylinders and black text
diagram made of yellow rectangles and orange, blue, and green cylinders and black text

Conflict Resolution Handling Techniques

Architectural Decisions

Application Design Patterns

Stateless vs Stateful Applications

Pattern 1: Many Masters but Only One Active

orange squares and blue cylinders connected by black arrows
orange squares and blue cylinders connected by black arrows

Pattern 2: One Master and Many Standbys (Readers)

orange squares and blue cylinders connected by black arrows
orange squares and blue cylinders connected by black arrows

Pattern 3: One Feeder and Many Readers

orange squares and blue cylinders connected by black arrows
orange squares and blue cylinders connected by black arrows

Pattern 4: Many Masters but Updated by Application

orange squares and blue cylinders connected by black arrows
orange squares and blue cylinders connected by black arrows

Pattern 5: Multiple Masters Buffered Writes

orange squares, green circle, and blue cylinders connected by black arrows
orange squares, green circle, and blue cylinders connected by black arrows

Adjournment

table with black text
table with black text

Key Takeaways

Capital One Tech

The low down on our high tech from the engineering experts…

Capital One Tech

The low down on our high tech from the engineering experts at Capital One. Learn about the solutions, ideas and stories driving our tech transformation.

Arup Nanda

Written by

Award winning data management and engineering leader, Chief Architect of Cloud Data at JPMorganChase, raspberry pi junkie, dad and husband.

Capital One Tech

The low down on our high tech from the engineering experts at Capital One. Learn about the solutions, ideas and stories driving our tech transformation.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store