0

How to choose a web server?

I have a website and it has good traffic. But the problem is that the database gets over thousands hit per seconds so I would like to get suggestions from you guys.

The server is capable of handling much traffic but MariaDB service gets off so What should I do?

I was thinking to use remote databases and a CDN server for contents. Current server + Database server + CDN Server.

Does anyone have a better suggestion that will help me to get rid of the problem and also reduce the cost of CDN/database servers??

[Sorry for my grammatical mistakes]

Nahid Islam
  • 193
  • 1
  • 5
  • 15
RAZIUL
  • 128
  • 2
  • 8
  • Questions on **professional server- or networking-related infrastructure administration** are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on [Server Fault](https://serverfault.com/about). – Maximilian Ast Sep 24 '19 at 07:20
  • Start by figuring out if you've got slow running queries, [n+1 issues](https://stackoverflow.com/questions/97197/what-is-the-n1-selects-problem-in-orm-object-relational-mapping), etc. The issue may be the code rather than the database itself - if you're getting thousands of database hits but *not* thousands of *pageviews* a second, you probably need to work on paring that down. – ceejayoz Oct 06 '19 at 00:53

2 Answers2

2
Rick James
  • 135,179
  • 13
  • 127
  • 222
2

but MariaDB service gets off so

I have no idea what this means.

I was thinking to use remote databases and a CDN server for contents

If you are serving content directly from your database then you will have performance problems. However using a CDN is only going to help if:

  1. A large part of your customer base has a long RTT to your server
  2. You have already optimized the caching of your content

If 1 is not the case, then you'll get as much benefit running your own cache. If 2 is the case then you're either going to have to fix your caching or enhance your database capacity.

gets over thousands hit per seconds

So what? Depending on the queries and the hardware, that might be a a constraint on your service performance. It might not. Tuning your DBMS and queries might help.

symcbean
  • 47,736
  • 6
  • 59
  • 94