Current architecture:
Problem:
Every time the micro service 1 needs information from the micro service 2 a B2B http request is performed. (The HTTP request use ETAG and Cache Control: max-age)
A more suitable solution is my opinion will the frontend to have the responsibility to fetch all the information required by the micro service 1 on the micro service 2 and delivered it to the micro service 2. This will avoid all this B2B HTTP requests.
The problem is how the micro service 1 can trust the information sent by the frontend. Perhaps using JWT to some how sign the data from the micro service 2 and the micro service 1 will be able to verify the message.
The micro service 1 needs the data from the micro service 2 on demand so the async approach using a broker does not apply here.
Ideal Architecture
Aucun commentaire:
Enregistrer un commentaire