© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
24 replies
Messiah

❔ Dealing with parallel http requests in an API

I have an API that receives many requests before they've concluded executing in the api. This causes unwanted behaviour such as writing twice to the database with the same PK.

What options do I have to fix this? I'm honestly looking for the easiest to implement solution, at this point I don't care about good practices or performance, except for only the ASP.NET controller having to be async (so I can't drop all requests while I process one).

I've thought about putting requests in queues or channels, also thought about implementing some kind of lock that doesn't drop incoming requests (if that's a thing).

Ideas?
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

Similar Threads

✅ Sending an HTTP Exception in Web API
C#CC# / help
3y ago
✅ Logging incoming HTTP requests with WebApplication
C#CC# / help
3y ago
Dealing with offsets in C#
C#CC# / help
2y ago
❔ Difficulties with http requests for image(blob) column in mysql
C#CC# / help
3y ago