Azure sharing data between microservices

Petr Klekner 40 Reputation points
2023-10-31T06:59:51.2933333+00:00

program in .NET and I use Azure to run my application. I have three services there and I am currently solving one problem. I am using a Message Broker to communicate between the services. However, I need to transfer and share one table from service A, which has about 100 records, between the services. How should I approach this? I am not using EvenSourcing.

  1. I thought of maintaining an azure storage table next to my SQL table, but I would have to write all changes to two points and inconsistencies can arise quite easily.
  2. I thought of sending it only to the Azure Storage Table when needed, but there again it is awkward to have to create multiple tables and not "update" just one.
  3. I also thought of using Redis and refilling it when the cache expires. I quite like this solution, but I don't know if it's the right one and the price is a bit overkill.
  4. Send log/record updates via message broker and update status in other services. This doesn't strike me as an appropriate use of Message broker, but I could be wrong.
Azure Table Storage
Azure Table Storage
An Azure service that stores structured NoSQL data in the cloud.
162 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,525 questions
Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
224 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,481 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,154 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 44,496 Reputation points Microsoft Employee
    2023-11-02T05:15:54.79+00:00

    @Petr Klekner Apologies for the delay repones!

    There are several approaches you can take to share a table between services in Azure without using Event Sourcing. Here are a few options:

    Azure Cache for Redis: You can use Azure Cache for Redis to store the table data in memory and share it between services. This approach can be fast and efficient, but it can also be expensive depending on the size of the data and the number of requests.

    Azure Storage Table: You can use Azure Storage Table to store the table data and share it between services. This approach can be cost-effective, but it can also be slower than using Redis or other in-memory solutions.

    Message Broker: You can use a message broker, such as Azure Service Bus or Azure Event Grid, to send updates to the table data between services. This approach can be efficient and scalable, but it can also be more complex to implement and maintain.

    SQL Database: You can use a SQL database to store the table data and share it between services. This approach can be reliable and scalable, but it can also be more expensive than using Azure Storage Table or other solutions.

    The best approach depends on your specific requirements and constraints, such as the size of the data, the frequency of updates, the performance requirements, and the budget. You may need to experiment with different approaches and evaluate their pros and cons before making a decision.

    I hope this helps. Let me know if you have any further questions or concerns.

    1 person found this answer helpful.
    0 comments No comments