© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•14mo ago•
51 replies
LazyGuard

Which Architecture to Choose?

I am working with two .NET-based architectures for processing HTTP POST requests, and I’m looking to wondering what to choose and how to measure things. Here's how the two architectures work:

Architecture 1: Decoupled Worker with Kafka
A POST request writes data to a database and sends a message to a Kafka topic.
A separate worker app consumes messages from Kafka, processes them, and updates the database.

Architecture 2: Background Service in the Same App
A POST request writes data to a database.
A background service running in the same application continuously polls the database for unprocessed tasks and processes them one by one.


Architecture 1 decouples the request handling and background processing using Kafka, allowing independent scaling of the worker.
Architecture 2 couples the request handling and background processing within the same app.

In what conditions I must chose the first or second one? Performance-wise how should I go about testing both ?
Thanks
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

Which architecture to choose
C#CC# / help
3y ago
✅ Which Nuget ASP.NET Core Versioning package to choose?
C#CC# / help
2y ago
❔ Which OAuth packages to choose for 3rd party user authentication?
C#CC# / help
3y ago
Which one should i choose for developr portfolio?
C#CC# / help
2y ago