32
FROM RAILS TO MICROSERVICES WITH GO Our experience with Gemnasium entreprise Jean-Philippe Boily @jipiboily | jipiboily.com http://metrics.watch Philippe Lafoucrière @plafoucriere https://gemnasium.com

Rails monolith-to-microservices-design

Embed Size (px)

Citation preview

FROM RAILS TO MICROSERVICES

WITH GOOur experience with Gemnasium entreprise

Jean-Philippe Boily @jipiboily | jipiboily.com

http://metrics.watch

Philippe Lafoucrière @plafoucriere

https://gemnasium.com

JEAN-PHILIPPE “JP” BOILY

• Founder of Metrics Watch (alerts for Google Analytics) • Software Engineer with experience working remotely for

US-based SaaS startups, and now consultant • Last one was Rainforest QA (YC backed)

PHILIPPE LAFOUCRIÈRE

• Founder of Tech-Angels / Gemnasium • CS Engineer from Université de Technologie de

Compiègne France

• Why? • Genesis • Criteria for architecture • Anatomy of a microservice • Conclusion

LET’S TALK ABOUT MICROSERVICES!

«  «  

WHY?

DEFINITIONSMicroservices: approach to developing a single application

as a suite of small services, each running in its own process and communicating with lightweight mechanisms

Monolithic application: self-contained, and independent from other computing applications.

RAINFOREST QAEasier to onboard people

Easier to reason about Small steps, no long term goals to rewrite

Performance issues Migration to Rails 4 (5?)

Code boundaries

GEMNASIUM

GENESIS

FIRST PROJECTbadge server because… • Performance issues • A lot of traffic • Easy to extract

CHOOSING TOOLSWe tried a lot of hosted PaaS.

We needed something solid and well maintained.

Choice: OpenShift

CRITERIA FOR ARCHITECTURE

SECURITY

DEPLOYMENT

SCALING

LOGGING

BACKUPS

MONITORING

DOCUMENTATION

ANATOMY OF A MICROSERVICE

NO FRAMEWORK!

Just Plain Old Go

HOW TO CONSUME IT?

HTTP? Queueing? Protobufs?

Heard of zero downtime database migrations? Same idea.

Defined & documented protocol, that supports versions.

UPGRADING WITHOUT 💥

CONFIGURATION

Environment variables Command line arguments

Mounts outside of Docker for secrets

TESTS

Test each microservices as any project. Have high level end to end testing.

HOW WILL IT SCALE?

For us, nothing specific. Just keep in mind many instance can co-exist.

Retry (Hystrix from Netflix) Double check

EMBRACE FAILUREThings will break one day.

MONITORING & ALERTINGMetrics, metrics, metrics.

Librato

Graylog

CONCLUSION

PROS & CONS• Better security • Easier evolution • Targeted scaling • Easier onboarding & maintenance

• Harder deployment • Added failure management • Longer to develop

START WITH A

MONOLITH

THANKS! QUESTIONS?

Hire JP - http://jipiboily.com Metrics Watch: http://metrics.watch - freeGoogleAnalyticsCourse.com

Use Gemnasium: gemnasium.com or enterprise.gemnasium.com