Answer the question
In order to leave comments, you need to log in
What is more suitable for building an in-memory database on .NET Core - asp.net over HTTP or console over TCP?
Good evening!
Need desperately lightweight self-made program that stores in physical memory a few values that change on demand. Be sure to use C# and .NET Core on Windows Server. Reading the documentation, I found that an ASP.NET Core MVC application can be deployed both on IIS and as a Windows service. You can definitely use HTTP/2 on IIS. What will be the difference between these options and a regular console application running on a server and listening on a TCP port in terms of performance and the minimum frequency of forced flushes to disk (restarts)?
Thanks to everyone in advance for the detailed replies.
Answer the question
In order to leave comments, you need to log in
1. There is a ready solution: www.litedb.org/. You can do without a program using this or a similar in-memory database.
2. Using Owin Self Hosting as a microservice, of course, you will incur some overhead that you communicate with this microservice via HTTP - there is more time to connect, send headers, receive headers, wait for a response. At the same time, WCF, via, say, Named Pipes (locally) or TCP (globally), is extremely fast and does not incur such overheads. On a large number of requests (millions per hour) it will be very noticeable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question