Git Product home page Git Product logo

push_setup's Introduction

Push Full-Stack Setup

This project assembles the necessary CloudFormation and Python scripts needed to deploy a complete Push stack with or without log processing for the Push Messages API component (needed for the Push Developer Dashboard).

Components

At it's core, Push is composed of two programs, one that holds connections open to clients, and one that handles incoming messages. This is to handle separate scaling concerns for holding millions of client connections. The core system is called autopush.

Other systems, such as the Push Developer Dashboard and Push Messages API run independently of autopush and function by processing log output. Running them requires the logging and log processing components to be deployed. Logs can be accumulated into S3 using Firehose even if later processing isn't desired.

Prerequisites

  • Python 2.7
  • AWS credentials

For log processing:

Create a virtualenv, activate it, and install the requirements:

$ virtualenv myenv
$ source myenv/bin/activate
$ pip install -r requirements.txt

You are now ready for one-command AWS deployments!

Push Service Only

Run:

$ python deploy.py push

Will output a CloudFormation template to stdout. If you'd like to use it, then save it to a file, and upload it in the AWS Console to Create Stack in AWS CloudFormation:

$ python deploy.py push > push_stack.cf

Then specify this file in the AWS CloudFormation UI during Create Stack.

Complete Push Stack

  • EC2

    • Autopush -> Firehose - Push Messages
    • Autoendpoint -> Firehose - Push Messages
    • Push Messages API
      • Same VPC subnet as Elasticache
  • VPC

    • Private VPC
      • Default route to NAT Gateway
      • Lambda Push Processor Runs Here
  • Security Groups

    • PushConnectionNode
      • Inbound from any to 80
      • Inbound from PushEndpointNode to internal routing ports
      • Outbound to any
    • PushEndpointNode
      • Inbound from any to 80
      • Outbound to any
    • PushMessagesNode
      • Inbound from any to 80
      • Outbound to any
    • Elasticache
      • Inbound from PushMessagesNode to 6379
  • Lambda

    • Push Processor
      • Same VPC subnet as Elasticache Redis
      • S3 Trigger off Push Messages
  • DynamoDB

    • Autopush Tables
    • Push Messages Table
  • Firehose

    • PushMessages -> S3 - Push Messages
  • S3 Buckets

    • Push Messages
    • Push Processor Settings
    • Push Processor Lambda Zips
  • Elasticache

    • Redis
  • IAM roles

    • Autopush
      • DynamoDB
        • Read/Write - Autopush Tables
        • Create Tables
      • Firehose
        • PutRecord/PutRecordBatch
    • PushProcessor
      • S3
        • Read/Write - Push Processor Settings
      • DynamoDB
        • Read/Write - Push Messages Table
      • AWSLambdaVPCAccessExecutionRole policy
    • PushMessagesFirehoseDelivery
      • S3
        • Read/Write - Push Messages Bucket
    • PushMessagesAPI
      • DynamoDB
        • Read/Write - Push Messages Table

push_setup's People

Contributors

bbangert avatar

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.