Re:gRPC for Microservices Communication
by davidw on Thursday September 23, 2021 @05:24PM
(#28635643)
> How do you fix that?
You run away as fast as you can is what you do.
Re:gRPC for Microservices Communication
by anonymoushn on Thursday September 23, 2021 @06:28PM
(#28636395)
The user service team told us we were querying them too much, so we just stored usernames in addition to user IDs to avoid querying them, then later documents would have the wrong username on them if the user changed their username.
One perspective is that we were negligent and caused a bug, but another possible perspective is that maybe the user service team should have caching instead of every other team building their own caching for the user service.
Re:gRPC for Microservices Communication
by marsdepinski on Thursday September 23, 2021 @11:24PM
(#28638281)
They should send a cache-control header in the response or 304 Not-modified when queried with not-modified-since. The calling service should always be the one responsible for caching to save the network round-trip. And if you're going to duplicate data like usernames, get a message channel setup to propagate the changes into the system cloning data.
How do you fix that ?