Architecture mode: API combination

Architecture pattern: API combination

Context

You have applied the microservice architecture pattern and the per-service database pattern. Therefore, realizing queries that connect data from multiple services is no longer straightforward.

Question

How to implement query in microservice architecture?

Conclusion

The query is implemented by defining the API Composer, which calls the service with the data and executes the in-memory connection of the result. Share a pictureshare picture?

Example

API Gateway usually performs API combination.

Result context

This model has the following benefits:

  • This is a way to query data in a microservice architecture The simple way

This model has the following disadvantages:

  • Some queries will cause inefficient memory connections for large data sets.

Associated mode

    • Each service database mode creates requirements for this mode
    • CQRS mode is an alternative Solution

Leave a Comment

Your email address will not be published.