Giter Site home page Giter Site logo

oktankab3's Introduction

Production Link

1. EC2 Launch Template

user data

#!/bin/bash 
sudo yum update -y
sudo yum install git -y
sudo yum install -y python3
git clone https://github.com/kmsarabu/oktankAB3.git
cd oktankAB3
sudo pip3 install -r requirements.txt
export DATABASE_HOST="xyz.rds.amazonaws.com"
export DATABASE_USER="oktadmin"
export DATABASE_PASSWORD='xyz'
export DATABASE_DB_NAME="oktank"
export DATABASE_PORT=5432
python3 app.py

2. Load Tests

apache benchmark

ab -n 100000 <url>
ab -c 300 -n 500 -t 300 <url>/products/fashion/

3. Latency

Cloudfront

curl -s -w '\nLookup Time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null http://<elb-url>.elb.amazonaws.com/products/fashion?page=1/
  • ALB (DNS)

Cloudfront

curl -s -w '\nLookup Time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null http://<url>/products/fashion?page=1/

curl -s -w '\nTotal Time:\t%{time_total}\n' -o /dev/null http://<url>/ 

Appendix

PostgreSQL/RDS PostgreSQL/Aurora PostgreSQL -> Import Data

psql -h <host> -p <port> -U <user> -d <dbname> < pgdata/oktank_pgdata.sql > dump.out 2>&1

Docker Build

sudo docker build -t octankretail:1.0 .

Docker Run

sudo docker run \
	-e DATABASE_HOST="xyz.us-east-1.rds.amazonaws.com" \	# Database Host
	-e DATABASE_USER="oktadmin" \				# User Name
	-e DATABASE_PASSWORD='xyz' \				# User Password
	-e DATABASE_DB_NAME="oktank" \				# Database Name
	-e DATABASE_PORT=5432 \					# Database Port
        -e ECHOST="host:port,host:port" \ 			# ElastiCache
	octankretail:1.0

oktankab3's People

Contributors

kmsarabu avatar

Watchers

 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.