Giter Site home page Giter Site logo

alb-tg-state's Introduction

alb-tg-state

Application Load Balancer Target Health Recorder whose function is to record the target health unhealthy reason when a target goes unhealthy. ALB in its current form only notifies when an unhealthy host count is recorded (>0) via Cloudwatch alarms, but it has no way of representating the current state of the targets at the time of the alarm, i.e it tells you something went wrong (unhealthyhost), but doesn't tell you which host went unhealthy and why, this code addresses that.

This program is built to persist the target unhealthy information (i.e when the alarm fired what targets where unhealthy and why).

Architecture leverages 4 aws services:

  • Cloudwatch Alarm
  • SNS
  • Lambda
  • Dynamodb (DDB)

Cloudwatch Alarm

Tracks the unhealthy target count of an ALB's target group and when the threshold is > 0 the alarm goes from 'ok' to 'alarm'.

SNS

Serves as in input trigger or link between the cw alarm and the lambda function. cw alarm -> SNS -> lambda

Lambda

Python 3 codebase that uses the aws boto3 sdk, it connects to the alb and ddb objects, does a describe on the tg and then writes the information gotten to ddb

DDB

DB that holds the persisted info of the target health state and unhealthy reason for admin to track what happened. Keeps information of the time that the put_item was recorded and holds the information of the describe_target_health output.

This code is suited for usecases where the target state of alb tg's are unstable, if a target flips in and out of unhealthy you want to know the reason why.

alb-tg-state.json

This is a json file in the master branch that contains a Cloudformation template that couples the entire solution end-to-end, you can use this as a source json to feed into Cloudformation and all components of this solution will be built automatically, don't have to manually create the solution via Console.

alb-tg-state

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.