microservices environment in production
TRANSCRIPT
David Papp @pappdav
Chief Architect @ghostmonitor
Who we are?
• Established in May 2015• The team headcount: 11• Company profile: E-Commerce analytics
What technologies do we use?
Microservices environment in production
”…the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.
- Martin Fowler
12factor application1. Codebase2. Dependencies3. Config4. Backing services5. Build release run6. Process
7. Port binding8. Concurrency9. Disposability10.Dev/Prod parity11.Logs12.Admin process
Build release run
Strictly separate build and run stages – 12factor.net
Concurrency
Scale out via the process model – 12factor.net
Disposability
Maximize robustness with fast startup and graceful shutdown – 12factor.net
Dev/Prod parity
Keep development, staging, and production as similar as possible – 12factor.net
Microservices patterns
Microservices patterns•Service communication HTTP/REST/AMQP
or asynchronous protocols
•API gateway
•Service discovery
•Multiple service instances per host
•Serverless deployment
•Database per Service
•Event-driven architecture
•Event sourcing
Database per Service
Service discovery
What is the difference?
The beginning
MVP – Minimum viable product
Refactoring! Why? Noo…
Refactoring - Benefits Benefits for Engineers
•Easily Maintained Code Base
•Consistent Code Standards
•No Need for Overtime
•Working Effectively Together
•Ease of Automated Testing
•Less Fragile, More Robust Code
Benefits for Business•Easier Feature Additions
•Incremental Delivery
•Ability to Change Requirements
•Faster Time to Market
•Easier Performance Improvement
•Easier Security Improvements
Why was this necessary? Because…
Finish! It’s works!
The new age
New age new problems…1. Framework
2. Local development
3. Testing
4. Build
5. Deploy
6. Infrastructure
7. Monitoring
8. Logging
Framework•Koa.jso gm-core-libo Moduleso SQSo Service Discoveryo Rediso API
Local development1. Docker2. Docker-compose3. Codeship jet4. Minikube5. Kube-Solo
Testing & Build•Unit test
•E2e test
•Integration test
codeship-services.yml
codeship-steps.yml
Deploy•Codeship2Kubernetes wrapper
•Written in Ruby
•Async• Worker
•Message queue for Redis
•Notification to Slack
•Rollback
•Template management• Resource control• Version control
Infra
stru
ctur
eInfrastructure
Monitoring •NewRelic
•Trace by Risingstack
•Apex.sh
•Pingdom
Logging•Airbrake/Errbit
•Logentries
•Trace by Risingstack
Production environment
Service types• API
•Service
•Mservice
•Worker
System statistics• 50+ different services
• 550+ containers
• 100+ different builds
Microservices cobweb
Microservices cobweb - Zoomed
Authentication & Authorization
Need more information… :)
Dashboard architecture
Dashboard all communications
Dashboard stat communications
Thanks
Questions?