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
-
kaipulla1132y@Hazarth Seems just like a bridge to me. Between kafka and the event producer. I feel its unncessary and the services can send events to kafka directly.
-
Use kafka directly.
In case you want a middleware wrapper - you can use a shared library for each microservice to use.
In case you want to encrypt what passes through kafka - use transparent sidecars. -
kaipulla1132y@rantsauce Exactly my point. And the question. The REST server seems to only take JSON as input. I mean what's the point in using a schema registry then. FYI, It is also being used.
-
kaipulla1132y@magicMirror Shared lib is what I'm pushing for as well.
Btw, reg sidecars and encryption, that's new to me. I'm assuming the sidcars intercept events from the service and encrypt it before sending it to kafka. Correct me if I'm wrong. Could you point some ref to any implementation? -
Hazarth94762yis it really just a bridge though? Is it not doing anything else, for example contacting multiple services to build up the Kafka event?
That's how we used something similar in the past since no single micro-service had the entire view of data, so the middle service was responsible for assembling whatever was necessary to push into stored or event pipes.
It kinda made sense on paper, but in reality it was hell -
kaipulla1132y@Hazarth It is not contacting services to build up events. Services hit these APIs with the event payload. REST server job is simple here - get the payload send the payload to kafka.
I'm not sure if they have addressed producer errors from kafka in the design. AFAIK, they didn't. -
kaipulla1132y@rantsauce The reason I got for the REST server's existence is "Today we use kafka and tomorrow we use something else. We need to build a wrapper around whatever that is". I disagree. If we go by the same, servers existed even before REST came into picture. I think they are overengineering this part of the design.
-
@kaipulla
Kafka can work over https/wss. That way there is no need to encrypt anything.
Using sidecars to handle the encryption is not really recommend. The idea is a reverse proxy that has a secure side, and an open side - it is similar to the middleware suggested in the original rant. -
@magicMirror using a service mesh sidecar is the correct solution. You can get mTLS between the services.
Related Rants
All the microservices are planning to communicate via kafka. And they are planning to put a REST API between kafka and the service. So all services hit the REST API with the events and the REST API send events to kafka.
I don't see any benefit of having a REST API between the service and kafka. What are the opinions in the wild?
question
microservice
kafka
system design