Pattern matching for messages on Istio

5/24/2019

I would like to implement the approach explained in the book "The tao of microservices" using kubernetes and Istio. In other words, I would like that microservices communicate to each other with pattern matched queue messages and still I use the routing abilities of Istio to send i.e. 5% of messages to a new microservice (Canari deployments).

I read in a rather old article that Istio does not support queue routing at the moment, but I'm wondering about the state of it now.

Does anyone has an example that implements this solution with Istio/queue topics? i.e. a message with the following routing keys

store:save
kind:entity

is rerouted to a microservice which registers itself as accepting

store:*
kind:entity
-- Mohsen Tabareh
istio
kubernetes
message-queue
microservices

1 Answer

5/24/2019

This is more of an architecture advice question.

For this pattern, you are probably better off using a message broker like RabbitMQ or Kafka, or an event bus (or something else).

Essentially, you would have services behind Istio that subscribe to certain message topics (Being published somewhere else which could be another service).

This way, for example, you could have something like (service 1, queue1/topic1), (service2, queue2/topic2). Then on Istio, if you separating Andriod and iOS traffic, you would have a rule that sends all the traffic for Android to (service 1, queue1/topic1) and all the traffic for iOS to (service2, queue2/topic2). Or you could do 80% of the traffic to (service 1, queue1/topic1) and 20% of the traffic to (service2, queue2/topic2)

You could run your message broker in Kubernetes or outside Kubernetes, depending on how you want to architect your solution.

Hope it helps!

-- Rico
Source: StackOverflow