I have a website where the number of visitors is increasing and it is facing a poor response time. I am not a server specialist and for this reason I want to expose my issue here to receive some feedback. The website has the following characteristics:
- Developed with ASP.NET Web Forms (I will be implementing a new version with ASP.NET MVC soon).
- It uses a PostgreSQL 9.1 database.
- It is 100% dynamic which means that every page is formed at run-time getting information from the DB.
- Hosted in a cloud server with 2 Cores and 4 GB of RAM.
- Windows Server 2012 in drive C:
- PostgreSQL DB in another "hard disk" as drive D:
- The average number of daily visitors is 2,500
Watching the Task Manager I can notice that there are many PostgreSQL processes which consume CPU 100%. Another process that is shown in the "IIS Worker Process" but I have not seen it as critical as the PostgreSQL process. So it seems that the main issue here has to do with the database access. When CPU usage is high the website response is extremely low and also it is very difficult to establish a remote desktop connection.
I have thought about upgrading the cloud server to, for example, 4 cores and 8 GB of RAM, but firstly I want to get feedback from experts here so I can take the best approach. I am not a server expert and, for this reason, I do not want to take steps blindly.