Live data from Hacker News

Some thoughts on microservices

filipnikolovski.com

71–80 of 139 posts

Re: Some thoughts on microservices

#71

My thoughts on microservices... They're fine. But what's NOT fine are nano services. I did security on a project once where it seemed that every function was its own microservice. User registration, user login, and password resetting were each a separate microservice. It was an utter nightmare.

Did they do this?

user-registration.api.dev.my-company.com

user-login.api.dev.my-company.com

password-reset.api.dev.my-company.com

or paths by some huge k8s nginx ingress?

Re: Some thoughts on microservices

#72
post #46

Microservices are not a solution, they're a capability. It's powerful for a team to be able to deploy a tiny service with the absolute minimum amount of explicit plumbing to meet operational requirements. Whether they should break their system up this way is a case by case judgment. Every place I've been, the costs of microservices get overlooked in favor of the illusion of decoupling. Microservices will absolutely m…

Your first question in a job interview should be: "do you use microservices?" If the answer is yes, you can save yourself a lot of time.

If you bill by the hour, it could be a long, fruitful contract.

Re: Some thoughts on microservices

#73
post #36

Earlier quoted context omitted.

Fails because the function is unreachable. The second half of the sentence you quoted says exactly that, why did you cut it out?

If execution of your binary is stopped some time between the call and return (with following restart), dealing with it is no simpler than dealing with network partitioning.

[deleted]

Re: Some thoughts on microservices

#74
post #3

One should probably not even think of microservices if one employs fewer than 100 programmers. In many cases microservices are introduced because of fashion and/or resume driven design not because it actually makes sense. I prefer refactoring a poorly structured monolith to refactoring poorly structured microservices in every case.

A coworker at a previous four person startup was always advocating microservices.

Having to push back on that over and over was frustrating.

We didn’t even have a real devops guy, or a vpc with properly partitioned CIDR blocks to segregate our databases from the public web and we’re going to start adding the complexity of a microservice architecture?

For what! We didn’t even have _users_ yet.

But try to get folk to dogfood our application since we had no actual users besides the founder and it was like pulling teeth.

Totally backwards to me.

Re: Some thoughts on microservices

#75
post #19

Fundamentally, I don't really see much difference between monoliths and microservices. In a monolith, you just call another function/class, but in microservices that function is a http call. I guess the benefit of microservices is the ability to independently scale different microservices, being able to choose different languages for different microservices and less conflicts in the repo as more people work on it, bu…

There’s a huge difference between http and function calls. When I call a function there is no chance it fails because the function ‘cannot be reached’. With services there are endless reasons why one service is unable to communicate with another. It’s a huge amount of overhead to build a system to handle inter-service communication and failure that doesn’t exist when only calling a function in the same binary.

> When I call a function there is no chance it fails because the function ‘cannot be reached’.

Run time DI configured from XML.

With enough Java anything is possible!

Re: Some thoughts on microservices

#76

My thoughts on microservices... They're fine. But what's NOT fine are nano services. I did security on a project once where it seemed that every function was its own microservice. User registration, user login, and password resetting were each a separate microservice. It was an utter nightmare.

Shoot, that's practically a monolith compared to the nightmare from which I resigned earlier this year. No way would they have allowed the entire password reset to reside in a single service. It would have been in the password-db-reader service, the password-db-mutator service, and the password-checker-service, among others. Absolutely terrifying and unmanageable.

Re: Some thoughts on microservices

#77

My thoughts on microservices... They're fine. But what's NOT fine are nano services. I did security on a project once where it seemed that every function was its own microservice. User registration, user login, and password resetting were each a separate microservice. It was an utter nightmare.

Did they do this? user-registration.api.dev.my-company.com user-login.api.dev.my-company.com password-reset.api.dev.my-company.com or paths by some huge k8s nginx ingress?

They started with the latter, but started shifting towards the former.

Re: Some thoughts on microservices

#78

An interesting list, but is this specific to Microservices, or just Service Oriented Architecture in general? For me, other than the obvious size difference, the difference between microservices and "large" (?) services is that a single team breaks down their domain into sensible layers, abstractions etc.

A single team can break down their domain into sensible layers and abstractions within a monolith. Similarly, A microservices/SOA architecture can fail to break down their domain into good boundaries and abstractions. I've seen this happen a lot. It's a lot harder to fix bad microservices than to fix a bad monolith

It's very hard to isolate load from different use cases, use a mixture of different technologies or combine batch, event driven and request/response paradigms within a monolith though.

I think certain things are easier to change in a monolith, where as other things are easier to change in a service based design. Depends what mistakes you've made along the way or how the spec/environment changes.

Re: Some thoughts on microservices

#79
post #4

Earlier quoted context omitted.

I like them for modularity, message queues and asynchronous events. But you are correct, esp. last one.

Plenty of languages offer modularity, message queues and asynchronous events within a monolith. They are quite idiomatic in go, rust and elixir

In process queues don't offer the same capacity smoothing as a shared queue. I don't think most of those queues offer persistence either. They're really not equivalent, are they?

Re: Some thoughts on microservices

#80
If I was CTO of a company, microservices would give me nightmares. How do you do due diligence on used free software (licenses and security updates)? How do you plan the resource usage of your whole setup if every developer can add a new autoscaling service? Who is actually keeping track on deployments so we don't accidentally overload the system? How do you refactor a cross-service feature consistently? And the worst part: Who keeps track of the n*n contracts between the services?

I mean yes, I know that each of these problems can be solved, sometimes in a relatively straightforward manner. But who really has all these aspects covered and doesn't run some services that started to smell weirdly a couple of months ago?

Post reply on HN