Search⌘ K
AI Features

Interactive Queries: Remote Queries

Explore how to perform remote interactive queries in Kafka Streams to retrieve state data distributed across multiple instances. Understand configuring application servers, discovering key locations, and querying remote stores for complete state access.

Querying state in distributed apps

Using interactive queries to retrieve data from a state store is straightforward when we only have one application instance. However, when we have multiple application instances, the data is distributed between the state stores of the different instances.

Let’s consider an example scenario: our application has three instances, each consuming one of three partitions. Each message has a single letter key, and the partitioning strategy routes keys A to J to partition 1, keys K to R to partition 2, and keys S to Z to partition 3.

Interactive query in a distributed application
Interactive query in a distributed application

Our application has a state store, and the data consumed by the application is stored in each state store according to the partitioning strategy. A user of our application makes a request from our application’s REST API for the ...