DB server specs

I am building an App that will connect to the internet for some functionality, said functionality will be provided by an asp net server that will in turn connect to a DB server to gather some data (login, licenses, contacts and a few more things). I am expecting a few million entries per table and let’s say 1k simple queries per minute (like logins or license checking). I am thinking of running the asp net part in a small 2 core arm server from hetzner and the DB in my home upgrading my home server. I can get up to a 10Gbe FTTH symetric quite cheaply.

The server currently runs unraid on a ryzen 2700 with 16Gb of ram, I am partial to upgrade the server to a 5950X and 32GB of ram and run VM (with 4 cores) and run MySql on it. As for the drives I plan on using some consumer grade sata ssd’s in a zfs pool with raidz.

Any opinions? Any other potential routes? My budget is quite limited.

Database latency has a significant impact on the performance of your server. I would strongly suggest running both in the same “datacenter”.

Personal opinion, asp.net is a poor choice in 2023. Microsoft seems to be indicating their intent to move away from supporting it. I support about 150 unique asp.net microservices at work and it’s astonishing how terrible the performance of the framework is.

2 Likes

I agree. Latency even with FTTH is around 10ms, depending on the distance and routing to the Hetzner server. That might work for the workload, but also can be a bottleneck. 1k queries doesn’t seem too extreme, but you’re essentially limited in IOPS on the SQL server by the network latency.

So it’s scalable up to a degree but there is an upper limit where latency-induced IOPS hits a barrier.

Bandwidth isn’t the problem. Latency is. But I’m still jealous on “10Gbit fiber for cheap” :wink:

With 10Gbit fiber…you got options on self-hosting everything. No need for co-location or renting servers. Would “fix” the latency as everything is on-premise. Or get a server for both services at the same provider.

I thought about latency, but, is 10ms that much? That’s the latency I have with game servers in the same region. I live in Spain and the web would be in Germany, or Netherlands. I am just trying to reduce costs initially.

The workload should not be sensitive to some latency, the basic queries would be login (classic username and password, with some Oauth key maintenance) and license checking, basically it would be a web server + license server with a simple rest api. As far as I can see, it’s not that latency sensitive, But be free to educate me.

It would be .net core 7 or 8. As far as I know, it’s becoming quite fast lately, faster than any JS framework could provide. The server would be monolithic with tons of threads, no services. Microservices can be quite slow and hardware intensive, while a monolithic architecture can be more optimized.
What would you use?

I thought of that, but being on the cloud offers easy and fast scaling at the beginning, plus I would need a ton of infrastructure at my tiny (40m2) home.

I guess I could rent 2 instances of the CAX11, one for the web server one for the DB, and run a replication server at home, but I would still need to upgrade my home server since it’s at it’s limit

Ohh it’s cheap, 25 euros (vat included) per month, but then you need a beast of a router to used it hah

I wasn’t entirely clear what your goals were here. If you’re just hitting a few non-latency-dependent endpoints, that should be fine.

THAT SAID It’s important to note that database migrations are a pain in the ass. If you ever decide that you want to move to the cloud, it’s going to be a big effort to make that change. Just something to be aware of when making your decision.

We’re using core 8 on a number of services, as well as some non-core services. It’s true, the core services perform much better than the windows “legacy” services, but we still have issues with them. They consume tons of memory, the threadpool needs painful tuning, sometimes they even flat out refuse to use all the memory we allocate to them, instead just throwing out of memory errors and quitting, despite the kernel not having allocated memory to them. I really should make a post dedicated to why I don’t like it.

When I speak of services, I was speaking more from an architectural concept of a service being any endpoint that is available to serve requests from a client device.

Personally, I would use Go, Python or JavaScript (node) for something like this. Go would be the fastest, JavaScript would probably be the easiest, and Python is an option to me because of my extensive knowledge with it.

Again, this is personal opinion, I just wouldn’t want to see people going down the nightmare of infrastructure headaches that I’ve been dealing with since I joined this company. (had I known, I probably wouldn’t have taken the job)

1 Like

I see, I have a friend that writes for asp .net , for about 5 years already, and he says the total opposite and he is going to write it for me, C++ is my jam which I am NOT going to use to create a Web service + web page, I am crazy but not THAT crazy. If it performs like garbage I will look at Go for it. I don’t particularly like Python or JS for this kinda thing, they are script languages for me.

Gotcha