Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
You mean they send http requests to eachother? Or through a broker? The former sounds like a no-no
-
@alexbrooklyn my question is how you do if done n HTTP. And if you do it in http, you'll a reverse proxy
-
@dmonkey (from what I've learned at school) if the microservices start sending eachother http requests then they must know of eachother's existence and have to handle sending requests to dead or malfunctioning services
With a message broker, all the services just scream events into it and then forget about it. Meaning that messages do get spread around services but the services themselves are largely independent and don't need eachother
Compare it to an office, every time something happens at your desk you scream it into the hallway. You don't know if someone's listening, and you don't care. You also listen for messages that you might need, if you're HR you're probably interested in messages concerning employees. If any of cour co-workers is down, you can still do your work since the hallway is the only thing you talk to.
If anyone thinks what I'm saying is incorrect please notify me, this is how I got taught microservices and its how I implement it most of the time. -
dmonkey21955y@alexbrooklyn oh yeah, I see... In my personal project every microservice is a docker service (deployed on the same host) so I didn't think about it.
-
dmonkey21955y... http requests lol
But it's a small personal project meant for personal use. I'll upgrade it in the future -
KDSBest7715yUdp is not too low level, if you can handle it.
You should try not to let services communicate to each other directly anway.
I recommend looking into an event sourcing or message broker approach.
All have ups and downs, there is no holy grail. Do what works best! -
mowgli3385yyou can try with a websocket communication, the microservices only suscribe to a channel, and there is a full duplex connection.
Related Rants
So I was talking microservices architecture with some lead techs.
And I started asking how did they combine/connect their microservices.
And despite having a lot, they use HTTP as the main transporter.
So the put some API-Gateway, all inside traffic has to go through it, to connect to the final client.
And I said that I do meshing microservices, and we use Nats as man transporter, so our messages go through UDP and not TCP.
And they freaked out. Saying UDP is too low level and not useful...
My question: if you do microservices oriented architecture, and not SOA, do you use HTTP? Did you use it simply because "it works"?
question
soa
transporter
msoa