meetup #3: migrate a fast scale system to aws
TRANSCRIPT
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
1. Physical System – Virtualization – Cloud Computing
2. Topica Edumall System Design3. Apply with DevOps4. Q&A
Meetup Agenda
Physical System
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• …
• 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
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.
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.
1. Physical System – Virtualization – Cloud Computing 2. Topica Edumall System Design
3. Apply with DevOps4. Q&A
Topica Edumall hybrid system design
• 3 important element of system design– Security– High Availability– Scalable
• => need a system with HA, Scalable, Security
Element of Edumall Insfrastructure
• VPS < DigitalOcean > (~40%) • Physical Server and Network (Viettel, VDC, FPT) • Cloud Computing ( AWS ) ( ~60%)
• Core system: Video Streaming
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)
Auto scale system
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 )
Edumall auto-scale system with Docker and Kubernestes on 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
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
Why?
• Easy to use• Fast to scale• Auto scale infrastructure and auto scale apps• Auto create ELB• Auto healing, warm-up
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
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)
1. Physical System – Virtualization – Cloud Computing 2. Topica Edumall System Design3. Apply with DevOps
4. Q&A
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
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
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
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.
Future
• Data analyst Tool on AWS• Serverless Architecture• IOT• Mobile Hub
Goals
• System Design with High Availability, Security and Scalabililty
• Easy Operations -> HumanOps
• Save much money, and more benefit .
Q&A
Meetup: www.meetup.com/aws-vn
FB: www.facebook.com/groups/amazonwebservicevietnam
Join Slack: https://aws-vn.herokuapp.com/