• Stars
    star
    326
  • Rank 129,027 (Top 3 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 11 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Library for managing service-level fault isolation using Amazon Route 53.

Amazon Route 53 Infima

Amazon Route53 Infima is a library for managing service-level fault isolation using Amazon Route 53.

Infima provides a Lattice container framework that allows you to categorize each endpoint along one or more fault-isolation dimensions such as availability-zone, software implementation, underlying datastore or any other common point of dependency endpoints may share.

Infima also introduces a new ShuffleShard sharding type that can exponentially increase the endpoint-level isolation between customer/object access patterns or any other identifier you choose to shard on.

Both Infima Lattices and ShuffleShards can also be automatically expressed in Route 53 DNS failover configurations using AnswerSet and RubberTree.

You can get started in minutes using Maven. Route53 Infima is built on top of the low-level Amazon Route53 client in the AWS SDK for Java. For support in using and installing the AWS SDK for Java, see:

Infima Features

Lattice

An Infima Lattice is an n-dimensional container class that allows you to categorize the endpoints in your service by availability-zone, software-version, underlying datastore or any other point of dependency which may cause a fault spanning one or more endpoints.

Apart from serving as a container for ShuffleShards and RubberTrees, Lattices may also be used to simulate failures directly. The failure of any dimensional unit, e.g. a particular availability zone, can be simulated. This allows you model and measure resiliency even for complex multi-dimensional dependency configurations. For example an advanced two dimensional lattice containing 18 endpoints in 3 different AZs, using 2 different software implementations, may be represented as;

                           us-east-1a     us-east-1b     us-east-1c
                        +--------------+--------------+--------------+
                        |              |              |              |
                 Python |     A B C    |     G H I    |    M N O     |
                        |              |              |              |
                        +--------------+--------------+--------------+
                        |              |              |              |
                  Ruby  |     D E F    |     J K L    |    P Q R     |
                        |              |              |              |
                        +--------------+--------------+--------------+

and then a fault or outage affecting an availability zone may be simulated;

                simulateFailure("AvailabilityZone", "us-east-1b") =
                           us-east-1a     us-east-1c
                        +--------------+--------------+
                        |              |              |
                 Python |     A B C    |    M N O     |
                        |              |              |
                        +--------------+--------------+
                        |              |              |
                  Ruby  |     D E F    |    P Q R     |
                        |              |              |
                        +--------------+--------------+

or a fault in a software version;

                 simulateFailure("SoftwareImplementation", "Python") =
                           us-east-1a     us-east-1b     us-east-1c
                        +--------------+--------------+--------------+
                        |              |              |              |
                  Ruby  |     D E F    |     J K L    |    P Q R     |
                        |              |              |              |
                        +--------------+--------------+--------------+

In addition to the base Lattice class, which is arbitrarily dimensional, Infima also provides three convenience classes for the common cases;

  1. SingleCellLattice - a class for setups where all endpoints are in a common compartment. Single Cell lattices offer a convenient way to get some of the benefits of ShuffleShards and RubberTrees without modeling the compartments in your service.
  2. OneDimensionalLattice - a class for expressing endpoints that have a single dimension of compartmentalization. This is the most common type of configuration used, with Amazon Web Services availability zones being the most common type of compartmentalization dimension.
  3. TwoDimensionalLattice - a class for advanced ultra-high-availability cases where availability zone compartments are themselves partitioned orthoganally along other dimensions such as software version or underlying datastore.

ShuffleShard

In traditional sharding, a customer, or object, or other service-level identifier is isolated to a particular endpoint out of many. For example, a user may be sharded to endpoint "C" out of "N" endpoints ...

                        A | B |*C*| D | E | F | G | H | ... | L | M | N

If there is some kind of problem associated with that user's traffic (for example poisonous requests, or an attack), the impact is constrained to the set of users sharing that shard, or 1/N of our total number of endpoints.

If the client has some built in resilience, such as support for multiple endpoints with short timeouts, and/or uses Route 53 DNS failover to handle endpoint failures, then Shuffle Sharding may exponentially increase the degree of isolation. With ShuffleShards, each identifier (user in the above example) is assigned multiple endpoints. For example user "Alice" may be assigned endpoints "C", "F" and "L";

                        A | B |*C*| D | E |*F*| G | H | ... |*L*| M | N

while user "Bob" may be assigned endpoints "B", "F" and "M";

                        A |*B*| C | D | E |*F*| G | H | ... | L |*M*| N

With a ShuffleShard pattern like this, if the traffic or requests associated with user "Bob" causes a problem to the three endpoints that "Bob" is being assigned, this has little if any impact on "Alice" as she shares only one endpoint with "Bob". The overall service-level impact is dramatically reduced to 1/(N choose K) , where K is the number of endpoints we assign each shuffle shard. For some services with a large enough number of endpoints, it is even possible to assign each user their own unique ShuffleShard.

With Infima, ShuffleShards are also Lattice-aware. The shuffle sharders will take care to assign endpoints from each compartment as appropriate. For example when provided with an availability-zone aware Lattice, the Infima Shuffle Sharders will compute ShuffleShards containing endpoints in each availability-zone. When given a two dimensional, or higher dimensional, Lattice the shuffle sharders will take care to ensure that every dimensional unit is represented at most once and that there is not an excess of endpoints in any particular axis of potential failure.

Infima provides two ShuffleShard implementations;

  1. SimpleSignatureShuffleSharder - This ShuffleSharding implementation uses simple probabilistic hashing to assign each identifier, represented by a byte array, a shuffle shard. The complete list of endpoints should be supplied in lattice form, and you may specify how many endpoints should be chosen from each eligible Lattice compartment.
  2. StatefulSearchingShuffleSharder - This ShuffleSharding implementation uses a datastore, provided by you, to record every shuffle shard as they are assigned. This implementation can then use this datastore to enforce guarantees about overlap between shuffle shards. For example you may specify that no two assigned shuffle shards may overlap by more than two endpoints. This implementation will perform an exhaustive search to find any eligible pattern of endpoints remaining to assign new shuffle shards.

AnswerSet

For resilient service endpoint discovery it is often useful to advertise multiple endpoints to clients. However this can be hard to manage in combination with health checks. AnswerSet is a new set type for expressing Route 53 DNS record sets that depend on many health checks.

Route 53 DNS Failover natively supports ResourceRecordSets which depend on a single Route 53 health check. Answer Sets conveniently generate a chain of ALIASes as neccessary, forming a logical "AND" series that ensure all associated health checks are passing in order to "reach" a particular answer. For example an answer for "www.example.com" containing 3 IP addresses; 192.0.2.1, 192.0.2.1 and 192.0.2.1 which depends on the 3 health checks abcd-1111, abcd-2222, abcd-3333 may be encoded as;

                            +-------------------------------------+
                            | Name:        www.example.com        |
                            | healthcheck: abcd-1111              |
                            | AliasTarget: ft23wj.www.example.com |
                            +-------------------------------------+
                                             |
                                             v
                            +-------------------------------------+
                            | Name:        ft23wj.www.example.com |
                            | healthcheck: abcd-2222              |
                            | AliasTarget: e6yj81.www.example.com |
                            +-------------------------------------+
                                             |
                                             v
                            +-------------------------------------+
                            | Name:        e6yj81.www.example.com |
                            | healthcheck: abcd-3333              |
                            | Records:     192.0.2.1              |
                            |              192.0.2.2              |
                            |              192.0.2.2              |
                            +-------------------------------------+

As Route 53 DNS Failover supports full backtracking when answering queries these chains of aliases can be used in place of any regular resource record set.

RubberTree

RubberTree is ternary tree class designed for managing elastic resources using Route 53 DNS. RubberTree uses AnswerSets to automatically express ShuffleShards and Lattices in Route 53 DNS configurations, with standby and failover configurations present for endpoint-level, availability-zone level faults or any other level you may care to define.

RubberTree will convert Lattices and ShuffleShards into weighted series of records that depend on the right Route 53 health checks. RubberTree will compute standby records that are prepared for the case of any single endpoint failure, and for faults with any unit in your dimensional Lattices (e.g. a particular availability zone). RubberTree takes care of the complex configuration needed to support endpoint discovery that is always prepared for faults.

For example, given a One Dimensional Lattice with the following configuration;

                                 us-east-1a  us-east-1b     
                                 +---------+----------+
                                 |  A   B  |  C   D   |     
                                 +---------+----------+

and a maximum number of records per answer of 3, RubberTree will compute a tree of the form;

                          www.example.com
                                 |
     +------------+---------------------------+---------------+-------------------+
     |            |              |            |               |                   |
weight: 1     weight: 1      weight: 1    weight: 1       weight: 0           weight: 0
[ A B C ]     [ A B D ]      [ A C D ]    [ B C D ]           |                   |
                                                              |                   |
                                                  secondary.www.example.com       |
                                                              |                   |
                                                              |       secondary.www.example.com
                                                              |                   |
                                                     us-east-1a.secondary         |
                                                             |                    |
                                                          [ A B ]        us-east-1b.secondary
                                                                                  |
                                                                               [ C D ]

As Route 53 follows zero-weighted branches only when there are no other healthy options, this configuration makes every effort to return as many healthy endpoints as possible. The RubberTree class handles all of the complex configuration.

Getting Started

  1. Sign up for AWS - Before you begin, you need an AWS account. Please see the AWS Account and Credentials section of the developer guide for information about how to create an AWS account and retrieve your AWS credentials.
  2. Minimum requirements - To run the SDK you will need Java 1.6+. For more information about the requirements and optimum settings for the SDK, please see the Java Development Environment section of the developer guide.
  3. Install the Amazon Route 53 Infima Library - Using Maven is the recommended way to install the Amazon Route 53 Infima Library and its dependencies, including the AWS SDK for Java. To download the code from GitHub, simply clone the repository by typing: git clone https://github.com/awslabs/route53-infima, and run the Maven command described below in "Building From Source".

Building From Source

Once you check out the code from GitHub, you can build it using Maven. To disable the GPG-signing in the build, use: mvn clean install -Dgpg.skip=true

More Repositories

1

git-secrets

Prevents you from committing secrets and credentials into git repositories
Shell
11,616
star
2

llrt

LLRT (Low Latency Runtime) is an experimental, lightweight JavaScript runtime designed to address the growing demand for fast and efficient Serverless applications.
JavaScript
8,074
star
3

aws-shell

An integrated shell for working with the AWS CLI.
Python
7,182
star
4

mountpoint-s3

A simple, high-throughput file client for mounting an Amazon S3 bucket as a local file system.
Rust
4,475
star
5

autogluon

AutoGluon: AutoML for Image, Text, and Tabular Data
Python
4,348
star
6

gluonts

Probabilistic time series modeling in Python
Python
3,686
star
7

aws-sdk-rust

AWS SDK for the Rust Programming Language
Rust
3,014
star
8

deequ

Deequ is a library built on top of Apache Spark for defining "unit tests for data", which measure data quality in large datasets.
Scala
2,871
star
9

aws-lambda-rust-runtime

A Rust runtime for AWS Lambda
Rust
2,829
star
10

amazon-redshift-utils

Amazon Redshift Utils contains utilities, scripts and view which are useful in a Redshift environment
Python
2,643
star
11

diagram-maker

A library to display an interactive editor for any graph-like data.
TypeScript
2,359
star
12

amazon-ecr-credential-helper

Automatically gets credentials for Amazon ECR on docker push/docker pull
Go
2,261
star
13

amazon-eks-ami

Packer configuration for building a custom EKS AMI
Shell
2,164
star
14

aws-lambda-powertools-python

A developer toolkit to implement Serverless best practices and increase developer velocity.
Python
2,148
star
15

aws-well-architected-labs

Hands on labs and code to help you learn, measure, and build using architectural best practices.
Python
1,834
star
16

aws-config-rules

[Node, Python, Java] Repository of sample Custom Rules for AWS Config.
Python
1,473
star
17

smithy

Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
Java
1,356
star
18

aws-support-tools

Tools and sample code provided by AWS Premium Support.
Python
1,290
star
19

open-data-registry

A registry of publicly available datasets on AWS
Python
1,199
star
20

sockeye

Sequence-to-sequence framework with a focus on Neural Machine Translation based on PyTorch
Python
1,181
star
21

aws-lambda-powertools-typescript

Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
TypeScript
1,179
star
22

dgl-ke

High performance, easy-to-use, and scalable package for learning large-scale knowledge graph embeddings.
Python
1,144
star
23

aws-sdk-ios-samples

This repository has samples that demonstrate various aspects of the AWS SDK for iOS, you can get the SDK source on Github https://github.com/aws-amplify/aws-sdk-ios/
Swift
1,038
star
24

amazon-kinesis-video-streams-webrtc-sdk-c

Amazon Kinesis Video Streams Webrtc SDK is for developers to install and customize realtime communication between devices and enable secure streaming of video, audio to Kinesis Video Streams.
C
1,031
star
25

aws-sdk-android-samples

This repository has samples that demonstrate various aspects of the AWS SDK for Android, you can get the SDK source on Github https://github.com/aws-amplify/aws-sdk-android/
Java
1,018
star
26

aws-solutions-constructs

The AWS Solutions Constructs Library is an open-source extension of the AWS Cloud Development Kit (AWS CDK) that provides multi-service, well-architected patterns for quickly defining solutions
TypeScript
1,013
star
27

aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Go
1,005
star
28

aws-cfn-template-flip

Tool for converting AWS CloudFormation templates between JSON and YAML formats.
Python
991
star
29

eks-node-viewer

EKS Node Viewer
Go
947
star
30

multi-model-server

Multi Model Server is a tool for serving neural net models for inference
Java
936
star
31

ec2-spot-labs

Collection of tools and code examples to demonstrate best practices in using Amazon EC2 Spot Instances.
Jupyter Notebook
905
star
32

aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
TypeScript
902
star
33

aws-saas-boost

AWS SaaS Boost is a ready-to-use toolset that removes the complexity of successfully running SaaS workloads in the AWS cloud.
Java
901
star
34

fargatecli

CLI for AWS Fargate
Go
891
star
35

fortuna

A Library for Uncertainty Quantification.
Python
882
star
36

aws-api-gateway-developer-portal

A Serverless Developer Portal for easily publishing and cataloging APIs
JavaScript
879
star
37

ecs-refarch-continuous-deployment

ECS Reference Architecture for creating a flexible and scalable deployment pipeline to Amazon ECS using AWS CodePipeline
Shell
842
star
38

dynamodb-data-mapper-js

A schema-based data mapper for Amazon DynamoDB.
TypeScript
818
star
39

goformation

GoFormation is a Go library for working with CloudFormation templates.
Go
812
star
40

flowgger

A fast data collector in Rust
Rust
796
star
41

aws-js-s3-explorer

AWS JavaScript S3 Explorer is a JavaScript application that uses AWS's JavaScript SDK and S3 APIs to make the contents of an S3 bucket easy to browse via a web browser.
HTML
771
star
42

aws-icons-for-plantuml

PlantUML sprites, macros, and other includes for Amazon Web Services services and resources
Python
737
star
43

aws-devops-essential

In few hours, quickly learn how to effectively leverage various AWS services to improve developer productivity and reduce the overall time to market for new product capabilities.
Shell
674
star
44

aws-apigateway-lambda-authorizer-blueprints

Blueprints and examples for Lambda-based custom Authorizers for use in API Gateway.
C#
660
star
45

amazon-ecs-nodejs-microservices

Reference architecture that shows how to take a Node.js application, containerize it, and deploy it as microservices on Amazon Elastic Container Service.
Shell
650
star
46

aws-deployment-framework

The AWS Deployment Framework (ADF) is an extensive and flexible framework to manage and deploy resources across multiple AWS accounts and regions based on AWS Organizations.
Python
636
star
47

amazon-kinesis-client

Client library for Amazon Kinesis
Java
621
star
48

aws-lambda-web-adapter

Run web applications on AWS Lambda
Rust
610
star
49

dgl-lifesci

Python package for graph neural networks in chemistry and biology
Python
594
star
50

data-on-eks

DoEKS is a tool to build, deploy and scale Data & ML Platforms on Amazon EKS
HCL
590
star
51

aws-security-automation

Collection of scripts and resources for DevSecOps and Automated Incident Response Security
Python
585
star
52

aws-glue-libs

AWS Glue Libraries are additions and enhancements to Spark for ETL operations.
Python
565
star
53

python-deequ

Python API for Deequ
Python
535
star
54

aws-athena-query-federation

The Amazon Athena Query Federation SDK allows you to customize Amazon Athena with your own data sources and code.
Java
507
star
55

amazon-dynamodb-lock-client

The AmazonDynamoDBLockClient is a general purpose distributed locking library built on top of DynamoDB. It supports both coarse-grained and fine-grained locking.
Java
469
star
56

shuttle

Shuttle is a library for testing concurrent Rust code
Rust
465
star
57

ami-builder-packer

An example of an AMI Builder using CI/CD with AWS CodePipeline, AWS CodeBuild, Hashicorp Packer and Ansible.
465
star
58

route53-dynamic-dns-with-lambda

A Dynamic DNS system built with API Gateway, Lambda & Route 53.
Python
461
star
59

aws-servicebroker

AWS Service Broker
Python
461
star
60

diagram-as-code

Diagram-as-code for AWS architecture.
Go
459
star
61

amazon-ecs-local-container-endpoints

A container that provides local versions of the ECS Task Metadata Endpoint and ECS Task IAM Roles Endpoint.
Go
456
star
62

datawig

Imputation of missing values in tables.
JavaScript
454
star
63

aws-jwt-verify

JS library for verifying JWTs signed by Amazon Cognito, and any OIDC-compatible IDP that signs JWTs with RS256, RS384, and RS512
TypeScript
452
star
64

aws-config-rdk

The AWS Config Rules Development Kit helps developers set up, author and test custom Config rules. It contains scripts to enable AWS Config, create a Config rule and test it with sample ConfigurationItems.
Python
444
star
65

ecs-refarch-service-discovery

An EC2 Container Service Reference Architecture for providing Service Discovery to containers using CloudWatch Events, Lambda and Route 53 private hosted zones.
Go
444
star
66

ssosync

Populate AWS SSO directly with your G Suite users and groups using either a CLI or AWS Lambda
Go
443
star
67

handwritten-text-recognition-for-apache-mxnet

This repository lets you train neural networks models for performing end-to-end full-page handwriting recognition using the Apache MXNet deep learning frameworks on the IAM Dataset.
Jupyter Notebook
442
star
68

awscli-aliases

Repository for AWS CLI aliases.
437
star
69

snapchange

Lightweight fuzzing of a memory snapshot using KVM
Rust
436
star
70

threat-composer

A simple threat modeling tool to help humans to reduce time-to-value when threat modeling
TypeScript
426
star
71

aws-security-assessment-solution

An AWS tool to help you create a point in time assessment of your AWS account using Prowler and Scout as well as optional AWS developed ransomware checks.
423
star
72

lambda-refarch-mapreduce

This repo presents a reference architecture for running serverless MapReduce jobs. This has been implemented using AWS Lambda and Amazon S3.
JavaScript
422
star
73

aws-lambda-cpp

C++ implementation of the AWS Lambda runtime
C++
409
star
74

pgbouncer-fast-switchover

Adds query routing and rewriting extensions to pgbouncer
C
396
star
75

aws-sdk-kotlin

Multiplatform AWS SDK for Kotlin
Kotlin
392
star
76

aws-cloudsaga

AWS CloudSaga - Simulate security events in AWS
Python
389
star
77

amazon-kinesis-producer

Amazon Kinesis Producer Library
C++
385
star
78

soci-snapshotter

Go
383
star
79

serverless-photo-recognition

A collection of 3 lambda functions that are invoked by Amazon S3 or Amazon API Gateway to analyze uploaded images with Amazon Rekognition and save picture labels to ElasticSearch (written in Kotlin)
Kotlin
378
star
80

amazon-sagemaker-workshop

Amazon SageMaker workshops: Introduction, TensorFlow in SageMaker, and more
Jupyter Notebook
378
star
81

serverless-rules

Compilation of rules to validate infrastructure-as-code templates against recommended practices for serverless applications.
Go
378
star
82

logstash-output-amazon_es

Logstash output plugin to sign and export logstash events to Amazon Elasticsearch Service
Ruby
374
star
83

kinesis-aggregation

AWS libraries/modules for working with Kinesis aggregated record data
Java
370
star
84

smithy-rs

Code generation for the AWS SDK for Rust, as well as server and generic smithy client generation.
Rust
369
star
85

syne-tune

Large scale and asynchronous Hyperparameter and Architecture Optimization at your fingertips.
Python
367
star
86

graphstorm

Enterprise graph machine learning framework for billion-scale graphs for ML scientists and data scientists.
Python
366
star
87

dynamodb-transactions

Java
354
star
88

amazon-kinesis-client-python

Amazon Kinesis Client Library for Python
Python
354
star
89

aws-sigv4-proxy

This project signs and proxies HTTP requests with Sigv4
Go
351
star
90

aws-serverless-data-lake-framework

Enterprise-grade, production-hardened, serverless data lake on AWS
Python
349
star
91

amazon-kinesis-agent

Continuously monitors a set of log files and sends new data to the Amazon Kinesis Stream and Amazon Kinesis Firehose in near-real-time.
Java
342
star
92

rds-snapshot-tool

The Snapshot Tool for Amazon RDS automates the task of creating manual snapshots, copying them into a different account and a different region, and deleting them after a specified number of days
Python
337
star
93

amazon-kinesis-scaling-utils

The Kinesis Scaling Utility is designed to give you the ability to scale Amazon Kinesis Streams in the same way that you scale EC2 Auto Scaling groups – up or down by a count or as a percentage of the total fleet. You can also simply scale to an exact number of Shards. There is no requirement for you to manage the allocation of the keyspace to Shards when using this API, as it is done automatically.
Java
333
star
94

amazon-kinesis-video-streams-producer-sdk-cpp

Amazon Kinesis Video Streams Producer SDK for C++ is for developers to install and customize for their connected camera and other devices to securely stream video, audio, and time-encoded data to Kinesis Video Streams.
C++
332
star
95

landing-zone-accelerator-on-aws

Deploy a multi-account cloud foundation to support highly-regulated workloads and complex compliance requirements.
TypeScript
330
star
96

statelint

A Ruby gem that provides a command-line validator for Amazon States Language JSON files.
Ruby
330
star
97

generative-ai-cdk-constructs

AWS Generative AI CDK Constructs are sample implementations of AWS CDK for common generative AI patterns.
TypeScript
327
star
98

aws-automated-incident-response-and-forensics

326
star
99

mxboard

Logging MXNet data for visualization in TensorBoard.
Python
326
star
100

crossplane-on-eks

Crossplane bespoke composition blueprints for AWS resources
HCL
319
star