News for hackers. Stuff that matters.

Ask HN: What are some sources to learn about microservices architecture?

I am a noob, learning things on my own. So lately I have been trying to understand how one should go about designing the architecture a non-trivial and fairly large web app and I came across the word micro-services. I tried googling, but that just made me more confused on what the term is. So some examples and explanation would be really helpful.
( 9 comments | 17 points | on HN )
Re:Ask HN: What are some sources to learn about microservice... by nOObieMonster on Friday September 22, 2017 @03:02AM (#15309975)
Mobile so just blurting this out...

typically you build apps as single 'monolithic' apps where all your code is in one place.

or

You split your code by criteria... say 'function'. So maybe seperating UI (front-end) from server/API (backend).

Reason is if you wanted to change part of your app its easier if there are clear boundaries between each part rather than mangled solo entities as with monolithic.

Microservices is an extreme version or seperation of concerns/function whereby you create 'black boxes' that handle one thing (auth, orders, stats, images) - each of those 'services' provides a mechanism for intra-communication... typically via an API (REST). sounds great in theory and makes large apps easier to distribute across tech stacks, geo and developer teams without worrying about other services... but... ensuring all services are secure, share information, self heal (recreate themselves when crashes occur), auto find each other across the interweb (discover) etc etc is a massive P.I.T.A.

Search 'Netflix microservices' on YouTube... reality is never as nice and clean as theory.

Also Orielly and other have books on M.S...

I would say build the monolith first (or simply seperate client from server/API), then split if need... rinse and repeat. Its gonna be real hard going if you're building a multi tenant app for most things and trying to start with M.S

When you need to scale... iterate. if M.S makes sense, split out a function and carry on.

Also check out Docker... sorta encourages M.S approach. Quickly create/destroy and deploy new 'service containers' etc...

Github has some examples too

https://github.com/cer/microservices-examples etc etc

Good luck

Re:Ask HN: What are some sources to learn about microservice... by lostPoncho on Friday September 22, 2017 @06:20AM (#15310735)
That was a clear explanation. Thanks. :D
Re:Ask HN: What are some sources to learn about microservice... by bincyber on Friday September 22, 2017 @12:01PM (#15313329)
Re:Ask HN: What are some sources to learn about microservice... by chuhnk on Friday September 22, 2017 @03:59AM (#15310194)
Start here https://martinfowler.com/articles/microservices.html

Then look here for patterns http://microservices.io/patterns/microservices.html

This guide is great https://www.nginx.com/blog/introduction-to-microservices/

Finally plugging my own tooling https://micro.mu/

Join http://slack.micro.mu if you want to discuss microservices

Re:Ask HN: What are some sources to learn about microservice... by lostPoncho on Friday September 22, 2017 @06:21AM (#15310738)
micro.mu really looks interesting.
Re:Ask HN: What are some sources to learn about microservice... by chuhnk on Friday September 22, 2017 @08:41AM (#15311594)
Thanks, its built based on personal experience and seems to resonate with companies who are undergoing scaling pains.
Re:Ask HN: What are some sources to learn about microservice... by guohuang on Friday September 22, 2017 @02:11PM (#15314401)
Re:Ask HN: What are some sources to learn about microservice... by hawkweed on Friday September 22, 2017 @07:16AM (#15311075)
I would suggest starting with the short introductory articles written by Chris Richardson: http://microservices.io/articles/index.html

A lot of useful articles can be found inside archives section of the Microservices Weekly newsletter: http://microservicesweekly.com/archives

Re:Ask HN: What are some sources to learn about microservice... by kelseyevans on Friday September 22, 2017 @10:30AM (#15312489)
Check out https://www.datawire.io/guide it breaks down how to think about microservices architectures in terms of development, infrastructure, deployment, and traffic.