meetup #3: migrate a fast scale system to aws

42
@Wayarmy – [email protected] Topica Edumall SysAdmin Migrate a fast scale system to AWS Sep 22 2016

Upload: aws-vietnam-community

Post on 08-Jan-2017

42 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Meetup #3: Migrate a fast scale system to AWS

@Wayarmy – [email protected] Edumall SysAdmin

Migrate a fast scale system to AWS

Sep 22 2016

Page 2: Meetup #3: Migrate a fast scale system to AWS

About me

• @wayarmy• Interested: Cloud Computing, AWS, Docker,

IaaS, SaaS, PaaS, Apache Stack, Elastic Stack, Hashi Stack, Ruby on Rails, Linux, Unix…

• Github: http://github.com/wayarmy• Sysadmin, SysOps, DevOps, HumanOps

Page 3: Meetup #3: Migrate a fast scale system to AWS

1. Physical System – Virtualization – Cloud Computing

2. Topica Edumall System Design3. Apply with DevOps4. Q&A

Meetup Agenda

Page 4: Meetup #3: Migrate a fast scale system to AWS

Physical System

Page 5: Meetup #3: Migrate a fast scale system to AWS

Advantage

• Easy to control local system

• Not depend on hosting provider

• Do whatever if you want

• …

Disadvantage

• So hard to scale• Security• Depend on network,

energy power• Expensive• …

Page 6: Meetup #3: Migrate a fast scale system to AWS

• Ops aren’t immutable, they’re not available 99.99%  nor 24/7  they’re not machines.

• The goal of HumanOps is to improve and maintain the good health of your team: easing communication reducing fatigue  and reducing stress

» David Mytton – CEO Server Density

Page 7: Meetup #3: Migrate a fast scale system to AWS

Cloud Computing

• The simple definition: It’s a style of computing based on shared, elastic resources delivered to users in a self-service, metered manner using web technologies. Yet, if you ask five people “what is cloud computing?” you can expect five different answers. Why? Because what matters to them is not what cloud computing is, but what it does for them.

» Oracle Cloud.

Page 8: Meetup #3: Migrate a fast scale system to AWS

Virtualization And Cloud Computing

• Easy to Scale• Don’t care about insfrastructure design• Don’t care about network design• Don’t depend on everything, depend on only “your wallet”

• Cloud computing is the easiest way to deliver your services over the Internet.

Page 9: Meetup #3: Migrate a fast scale system to AWS

1. Physical System – Virtualization – Cloud Computing 2. Topica Edumall System Design

3. Apply with DevOps4. Q&A

Page 10: Meetup #3: Migrate a fast scale system to AWS

Topica Edumall hybrid system design

• 3 important element of system design– Security– High Availability– Scalable

• => need a system with HA, Scalable, Security

Page 11: Meetup #3: Migrate a fast scale system to AWS
Page 12: Meetup #3: Migrate a fast scale system to AWS

Element of Edumall Insfrastructure

• VPS < DigitalOcean > (~40%) • Physical Server and Network (Viettel, VDC, FPT) • Cloud Computing ( AWS ) ( ~60%)

• Core system: Video Streaming

Page 13: Meetup #3: Migrate a fast scale system to AWS

Edumall – Microservices on AWS

• IaaS– VPC – Network – Firewall– Compute – EC2– Storage: S3, Glacier ( EFS - Future)

• SaaS– DBMS: DynamoDB– Caching– CDN– WAF– Datanalyst Service (Near Future)– Message Bus Application– API Gateway– ETS– WorkSpaces

• ServerLess Architecture (Near Future)

Page 14: Meetup #3: Migrate a fast scale system to AWS

Auto scale system

Page 15: Meetup #3: Migrate a fast scale system to AWS
Page 16: Meetup #3: Migrate a fast scale system to AWS
Page 17: Meetup #3: Migrate a fast scale system to AWS
Page 18: Meetup #3: Migrate a fast scale system to AWS
Page 19: Meetup #3: Migrate a fast scale system to AWS
Page 20: Meetup #3: Migrate a fast scale system to AWS
Page 21: Meetup #3: Migrate a fast scale system to AWS
Page 22: Meetup #3: Migrate a fast scale system to AWS
Page 23: Meetup #3: Migrate a fast scale system to AWS
Page 24: Meetup #3: Migrate a fast scale system to AWS
Page 25: Meetup #3: Migrate a fast scale system to AWS
Page 26: Meetup #3: Migrate a fast scale system to AWS

Benefit

• High availability system• Easy with scale and everything will be automated• Auto healing• Save much money ( save about 40% with 100%

running application on AWS )

Page 27: Meetup #3: Migrate a fast scale system to AWS

Edumall auto-scale system with Docker and Kubernestes on AWS

Page 28: Meetup #3: Migrate a fast scale system to AWS

Docker

• Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

• Build – Ship – Run• Build once, run any where

Page 29: Meetup #3: Migrate a fast scale system to AWS

Kubernetes

• Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

• “Write once, run forever”• Build Auto-scale and self-healing system

Page 30: Meetup #3: Migrate a fast scale system to AWS

Why?

• Easy to use• Fast to scale• Auto scale infrastructure and auto scale apps• Auto create ELB• Auto healing, warm-up

Page 31: Meetup #3: Migrate a fast scale system to AWS
Page 32: Meetup #3: Migrate a fast scale system to AWS

Some Number? (6 months ago)

• Video content transfer: 90GB (/1 day)

• Static Content (image, js, html, css): 1GB• Total Request: ~ 32k• Total Ram: ~ 128GB• Total CPU: ~32vCpus• Unique Visitor: ~4k6• Total User: ~500k• Maximum Unique Visitors: ~300

Page 33: Meetup #3: Migrate a fast scale system to AWS

Some number? (present)

• Video content transfer: 1,5 TB (/1 day)

• Static Content (image, js, html, css): 100GB• Total Request: ~ 5 mil• Total Ram: ~ 2TB• Total CPU: ~400vCpus• Unique Visitor: ~50k• Total User: ~20m• Maximum Unique Visitors: ~5k• EC2 Start: ~ 5 (M4 2xLarge)

Page 34: Meetup #3: Migrate a fast scale system to AWS

1. Physical System – Virtualization – Cloud Computing 2. Topica Edumall System Design3. Apply with DevOps

4. Q&A

Page 35: Meetup #3: Migrate a fast scale system to AWS

With Dev

• Easy to use with SaaS• Easy with authentication• Easy with test environment• Easy with code, change writing apps to reading docs

of AWS SaaS, and apply AWS SaaS to Our Microservice System

• Document as Code• Save 40% code-time with SaaS

Page 36: Meetup #3: Migrate a fast scale system to AWS

With Ops

• Don’t need think about the insfrastructure, about physical servers, ISP, Network, …

• Easy with Deployment• Don’t need a monitoring system, Cloudwatch will

take care all of them.• Less time for build, deploy a new insfrastructure,

platform

Page 37: Meetup #3: Migrate a fast scale system to AWS

CI-CD workflowDeveloper push a new commit to gitlab

Gitlab Trigger Gitlab Runner fetch and pull repo

Gitlab-runner build Docker imagefrom Dockerfile

Excute test on all targetWith all environment

Delivery images to Docker hubOr Private registry

Deploy to K8s Cluster

Page 38: Meetup #3: Migrate a fast scale system to AWS

Disadvantages

- While moving system on AWS, need to keep alive two system ( Old and New ). So that, need much money.

- So hard to motivate all team to use AWS. Someone can’t change their mind.

- High latency from Vietnam to AWS when AAG is on maintainance.

Page 39: Meetup #3: Migrate a fast scale system to AWS

Future

• Data analyst Tool on AWS• Serverless Architecture• IOT• Mobile Hub

Page 40: Meetup #3: Migrate a fast scale system to AWS

Goals

• System Design with High Availability, Security and Scalabililty

• Easy Operations -> HumanOps

• Save much money, and more benefit .

Page 41: Meetup #3: Migrate a fast scale system to AWS

Q&A

Page 42: Meetup #3: Migrate a fast scale system to AWS

Meetup: www.meetup.com/aws-vn

FB: www.facebook.com/groups/amazonwebservicevietnam

Join Slack: https://aws-vn.herokuapp.com/