17. ● Features
○ DAU (Daily active users)
○ Retention
○ New installation
● Platforms
○ Google Play
○ Google Analytics
○ Parse.com
App Statistics
17
Created by Balintseby -
Freepik.com
45. ● docker 1.9
○ Support Network plugin
● docker swarm 1.1.2
○ Run as container
○ Just announce production ready
● docker-compose 1.5.1
● leak documents
Early Stage
45
51. Challenges
● Load balancer
● Service discover
● Overlay Network
● Build & Deployment
51
IDC
Server 1 Server 2
DockerDocker
Overlay Network
NGINX
ES-02 ES-03ES-01
C*-01 C*-02C*-03
Spark/M Spark/WSpark/W
API API
NGINX
logstash Rediskibana
52. Service Discovery & Load Balancer
52
Reference: 关于负载均衡和服务发现 https://goo.gl/2DYoZs
53. IDC
Server 1 Server 2
DockerDocker
Overlay Network
NGINX
ES-02 ES-03ES-01
C*-01 C*-02C*-03
Spark/M Spark/WSpark/W
API API API
NGINX
logstash Rediskibana
VPN
53
Service Discovery
54. ● IP + Port = Service
● Container link (deprecated)
● gliderlabs/registrator
○ Registers and deregisters automatically
○ Communicate with Docker engine
○ Works with consul/etcd
Service Discovery in Swarm
54
registrator:
image: gliderlabs/registrator
volumes:
- /var/run/docker.sock:/tmp/docker.sock
networks:
- YEAH
command: "-cleanup -resync 30 consul://consul:8500"
depends_on:
- consul
55. Load balancer in Swarm
● fabiolb/fabio
○ Zero-conf
○ Work with consul
■ Already setup consul
○ HTTPS off-load
○ Dynamic loading without restart
○ Metrics Support
55
LBS Svc2
Svc3
Svc1
Svc4
61. Chanllenges in IDC
● No Firewall
● No LoadBalancer
● Only Host disk
○ Hard to scale-out & distribute loading
● No Object storage
○ Backup files
○ Archive logs
61
62. IDC
Server 1 Server 2
DockerDocker
Overlay Network
NGINX
ES-02 ES-03ES-01
C*-01 C*-02C*-03
Spark/M Spark/WSpark/W
API API API
NGINX
logstash Rediskibana
Disk Disk
hostPath: /data/es-01 hostPath: /data/csx-01
NFS
VPN
AdHoc
62
80. ● Monitor
○ Prometheus
○ End-to-end monitor
○ User as Monitor (誤)
■ Fabric
■ Firebase
Problems
80
81. Problems - Storage
Server
● Heavy I/O
● Scalability in kubernetes
○ stateful service
○ pod arrangement
Docker
NGINX
ES-02ES-01
C*-01C*-03
Spark/W
API API
kibana
Disk
81
82. Summary of IaaS / Bare Metal
● Assemble your own components
● High cost (budget & communication)
● Storage still a big problem
82
89. ● Storage
○ Persistent disk
Refactor (cont.)
89
Server
Docker
NGINX
ES-02ES-01
C*-01C*-03
Spark/W
API API
kibana
Disk
Server
Docker
NGINX
ES-02ES-01
C*-01C*-03
Spark/W
API API
kibana
PD PD PD PD