Gartner Research

Working With Data in a Microservices Architecture

Summary

Microservices architecture (MSA) is characterized by tightly scoped, loosely coupled services that control all access to their data. Technical professionals responsible for developing microservices applications must understand how MSA affects the way their applications access and share data.

Published: 22 January 2019

ID: G00370409

Analyst(s): Kevin Matheny Lyn Robison

Table Of Contents

Analysis

  • Data Design Considerations
    • True Microservices Architecture Requires Decoupled Data Stores
  • Operational Data Read Access Across Service Boundaries
    • Requesting Data at Time of Need
    • Maintaining a Read-Only Duplicate of Data
  • Transactions Across Service Boundaries
    • Use Transaction Boundaries to Help Define Service Boundaries, and Vice Versa
  • Logging, Reporting and Analytics Across Service Boundaries
    • Subscribe to Data Events
    • Use Existing Operational Interfaces
    • Provide Dedicated Reporting Interfaces
    • Create Reporting Interfaces Within Operational Services’ Data Stores Only as a Last Resort
    • Do Not Allow Direct Access to Operational Services’ Data Stores
  • Data Patterns and Anti-Patterns
    • Pattern: CQRS
    • Pattern: Sagas and Compensating Transactions
    • Pattern: Event Sourcing
    • Anti-Pattern: Shared Database
    • Anti-Pattern: Two-Phase Commit

Conclusion

Gartner Recommended Reading

Already a Gartner client?

Become a Client

This research is reserved for paying clients. Speak with a Gartner specialist to learn how you can access this research as a client, plus insights, advice and tools to help you achieve your goals.

Contact Information

All fields are required.

By clicking the "Submit" button, you are agreeing to the Gartner Terms of Use and Privacy Policy.

Experience Information Technology conferences

Master your role, transform your business and tap into an unsurpassed peer network through our world-leading virtual and in-person conference series.

©2021 Gartner, Inc. and/or its affiliates. All rights reserved. Gartner is a registered trademark of Gartner, Inc. and its affiliates. This publication may not be reproduced or distributed in any form without Gartner’s prior written permission. It consists of the opinions of Gartner’s research organization, which should not be construed as statements of fact. While the information contained in this publication has been obtained from sources believed to be reliable, Gartner disclaims all warranties as to the accuracy, completeness or adequacy of such information. Although Gartner research may address legal and financial issues, Gartner does not provide legal or investment advice and its research should not be construed or used as such. Your access and use of this publication are governed by Gartner’s Usage Policy. Gartner prides itself on its reputation for independence and objectivity. Its research is produced independently by its research organization without input or influence from any third party. For further information, see Guiding Principles on Independence and Objectivity.