cloudsolutionday 2016: docker & faas at getvero.com
TRANSCRIPT
![Page 1: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/1.jpg)
TU HOANGSoftware Engineer / @rebyn / [email protected]
Docker @ VeroData Migration with Docker @ Vero
CLOUD FUNCTIONS @ VERO
![Page 2: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/2.jpg)
@getveroAutomate customer interactions based on what your customers do, ie: fire welcome coupon campaign when● User signs up; and● Has at least an
outstanding item in cart for a week; and
● Has never received a coupon before.
+250 large consumer businesses use Vero daily:
![Page 3: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/3.jpg)
#CONTAINERS- Opinionated: EC2-Spot,
ECS, ELB, Logentries- 20+ kinds of workers- Memory spec ranging
from 302MB to 2048MB memory
- Anytime: 148 containers (across 80 instances)
- Autoscaled: +350
- Peak: 16 million emails/day
- Weekly volume: 32.2M 75.2M
- Track 20.000 46.296 customer actions/min (+1B +2B/mth)
- Software engineering: 6- DevOps-y engineers: 3
Scale @getvero (with changes since Nov 2015)
![Page 4: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/4.jpg)
![Page 5: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/5.jpg)
![Page 6: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/6.jpg)
![Page 7: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/7.jpg)
![Page 8: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/8.jpg)
Cloud Functions- Stateless compute containers- Ephemeral- Event-triggered- (AND/OR) Significantly depend on third-party
services
![Page 9: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/9.jpg)
Cloud Function 1/7: autoscaling
![Page 10: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/10.jpg)
Cloud Function 2/7: deliverability
![Page 11: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/11.jpg)
Cloud Function 2/7: deliverability
![Page 12: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/12.jpg)
Cloud Function 2/7: deliverability
![Page 13: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/13.jpg)
Cloud Function 2/7: deliverability
![Page 14: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/14.jpg)
Cloud Function 3/7: newsletter diagnosis
![Page 15: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/15.jpg)
Cloud Function 3/7: deployment
![Page 16: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/16.jpg)
@dustay ecs:deploy_by_image mailship:master
1. Check latest SHA’s pending status2. Check ongoing deployments (if any)
2a. YES: cancel | set a reminder2b. NO: DEPLOY AWAY
Cloud Function 3/7: deployment
![Page 17: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/17.jpg)
Cloud Function 3/7: deployment
![Page 18: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/18.jpg)
@dustay stats:low --threshold=50 | stats:refetch $newsletter_id
Triggershttps://bot.getvero.com:1234 /v1/triggers/UUID
HTTP
Chat commands
![Page 19: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/19.jpg)
- Amazon S3
- Amazon DynamoDB
- Amazon Kinesis Streams
- Amazon Simple Notification Service
- Amazon CloudWatch Logs
- Scheduled Events (powered by Amazon CloudWatch Events)
- Amazon API Gateway
- Other Event Sources: Invoking a Lambda Function On Demand
Trigger Options
![Page 20: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/20.jpg)
- Cloud agnostic (vanilla Docker)
- Navigate our setup of security firewalls (though not much desired since most services are public)
- Language agnostic (unified input/output)
Why we rolled out our own
cloud function service
![Page 21: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/21.jpg)
- Of course, it’s always better if someone else manages it
- Startup latency = used to be an issue (then we learnt how to autoscale and/or prewarm infra)
- Horizontal scaling = rough around edges (also applies to our services (micro/nano), not just functions)
- Testing was a pain
Why we ate up along the
way
![Page 22: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/22.jpg)
- Development friction = extremely minimal now
- Services are being created with confidence and scalability in mind despite small team
- 100% automation = within reach now
- Testing = microservice testing. Should bring about no changes.
- Matured autoscaling agent + spot fleet management = #BIGWIN for both functions and services
- See 75% cost reduction upon spot adoption
#WINS
![Page 23: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/23.jpg)
- Stack decomposing = trend forward. Start first with parts of a monolith that interact with external services significantly.
- We control scaling-up. This is equally crucial.
#WINS
![Page 24: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/24.jpg)
- Functions are being gradually treated as first class citizens
- We usually sit down and approach an issue re: can we narrow this business down to nano services / functions
Misc
![Page 25: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/25.jpg)
- Credentials should be loaded upon instance provisioning or container provisioning, not hardcoded into scripts
- Vendor lockin = a concern, though not pressing. IAM- and security group-based services = kept to minimum and has failover.
- Instrumentation = crucial.
- Request/response mapping templates = must. Shared library.
Gotchas
![Page 26: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/26.jpg)
Infrastructure Setup
![Page 27: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/27.jpg)
Infrastructure Setup
![Page 28: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/28.jpg)
Development Productivity
To quote Amazon:Focus on the code that mattersInnovate rapidlyReduce time to market/product
Continuous scaling
![Page 29: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/29.jpg)
DEPLOYMENT(I run out of time)
![Page 30: Cloudsolutionday 2016: Docker & FAAS at getvero.com](https://reader036.vdocuments.site/reader036/viewer/2022062306/5871ae6f1a28abda6a8b61a7/html5/thumbnails/30.jpg)
https://www.getvero.com/careers(Senior Backend Engineers / Site Reliability Engineers
much needed!)
Thanks for tuning in.