Re: Recommended web and database server specification

2019-08-15 Thread Nick Holland
On 8/14/19 9:20 PM, Aaron Mason wrote:
> Hi Tito
> 
> Can you tell us more about the database?  How often will its data be
> changed, added to, etc? How much data do you have?  How complex are
> your DB queries?  These answers will help determine the RAM and
> processor requirements for the database.
> 
> As for the web server daemon itself, I think Reyk Floeter would be the
> best placed to answer that question - also paging Nick Holland for
> more hardware expertise.
> 
> On Thu, Aug 15, 2019 at 12:57 PM Tito Mari Francis Escano
>  wrote:
>>
>> Hi to everyone at misc,
>>
>> I'm recently working on an OpenBSD-based PHP7 web application with
>> PostgreSQL-backend for a local government agency and was wondering what
>> would you recommend as the acceptable server specification. This web
>> application won't reach the Google or Facebook level of visits per day,
>> but I was hoping to prepare this be deployed and run for quite a long
>> time and ready for about 60,000 visits per day at most.
>>
>> Your advise and recommendation would be greatly appreciated. Thanks so much.

Dang, somehow, I've got a bad habit of hitting CTRL-ENTER at the end of 
lines, and that's "SEND" on some mail clients.  Did that twice in the
24 hours on two different mail clients.  sigh.

ANYWAY...

60,000 hits per day isn't the question.  Rarely does load come in evenly
spread out, usual things are spikey -- after school, after work, before
work, whatever.  So the scaling question is "how many hits per second
can you expect peak?" and "how much delay will your users tolerate at
that peak moment?"

And really, you need to test your own app in your own environment with
your expected peak load.

IF your bosses are insisting on "buy once for five years", you are going
to horribly overspend.  They are damn fools.  But, they are also "The
Boss", so you live by 'em.  You will save a lot of money by buying
something that will PROBABLY work for a year or so, and replace it *IF*
it turns out to be undersized.

If you want to do it right, take an old pc with a standard SATA disk,
build it out as a web server, and load test it with your peak expected
load with your application being used in a realistic way.  If it works,
get a faster server with more memory and use SSDs, and you will be in
great shape. 

Nick.



Re: Recommended web and database server specification

2019-08-15 Thread Nick Holland
On 8/14/19 9:20 PM, Aaron Mason wrote:
> Hi Tito
> 
> Can you tell us more about the database?  How often will its data be
> changed, added to, etc? How much data do you have?  How complex are
> your DB queries?  These answers will help determine the RAM and
> processor requirements for the database.
> 
> As for the web server daemon itself, I think Reyk Floeter would be the
> best placed to answer that question - also paging Nick Holland for
> more hardware expertise.
> 
> On Thu, Aug 15, 2019 at 12:57 PM Tito Mari Francis Escano
>  wrote:
>>
>> Hi to everyone at misc,
>>
>> I'm recently working on an OpenBSD-based PHP7 web application with
>> PostgreSQL-backend for a local government agency and was wondering what
>> would you recommend as the acceptable server specification. This web
>> application won't reach the Google or Facebook level of visits per day,
>> but I was hoping to prepare this be deployed and run for quite a long
>> time and ready for about 60,000 visits per day at most.
>>
>> Your advise and recommendation would be greatly appreciated. Thanks so much.

heh.  got called out, doesn't take much to make me start talking. :)



Re: Recommended web and database server specification

2019-08-15 Thread Roderick




On Thu, 15 Aug 2019, Roderick wrote:


It [sqlite] is good integrated with tcl, hence I would use as server:

https://de.wikipedia.org/wiki/NaviServer


I mean, I would not use php. :)



Re: Recommended web and database server specification

2019-08-15 Thread Roderick




On Thu, 15 Aug 2019, Tito Mari Francis Escano wrote:

to prepare this be deployed and run for quite a long time and ready for about 
60,000 visits per day at most.


Perhaps sqlite:

https://www.sqlite.org/whentouse.html

It is good integrated with tcl, hence I would use as server:

https://de.wikipedia.org/wiki/NaviServer

Rodrigo



Re: Recommended web and database server specification

2019-08-14 Thread Jordan Geoghegan



On 8/14/19 9:40 PM, Tito Mari Francis Escano wrote:

Hi Jordan,

Thanks for replying. I apologize I forgot to mention that I was asking 
for the web and database spec because this will be an on-premise 
deployment, cloud platforms are out of the equation. I hope this will 
clarify my concern asking for server specification for a web and 
database server that won't have high traffic but will have a long run.


Thanks again.

On 15/08/2019 12:27 PM, Jordan Geoghegan wrote:


On 8/14/19 7:56 PM, Tito Mari Francis Escano wrote:

Hi to everyone at misc,

I'm recently working on an OpenBSD-based PHP7 web application with 
PostgreSQL-backend for a local government agency and was wondering 
what would you recommend as the acceptable server specification. 
This web application won't reach the Google or Facebook level of 
visits per day, but I was hoping to prepare this be deployed and run 
for quite a long time and ready for about 60,000 visits per day at 
most.


Your advise and recommendation would be greatly appreciated. Thanks 
so much.





I don't have much experience running php apps in production, but I 
have run a Django app in production using httpd and Postgres. Using a 
basic 4 core VM from Vultr, benchmarks showed it was able to serve 
over 4000 requests per second. With those kind of numbers you could 
easily serve over a million hits per day. It didn't have a lot of 
complex DB activity going on, so the benchmarks were more testing 
httpd and Djangos throughput, but I digress. If you cluster your 
servers, you should be able to hit far more.


Jordan



If you're only planning on serving ~60,000 hits a day, any modern server 
should suit your needs adequately. I'm sure others on misc@ are far more 
well versed in hardware than I am, but I've had good success with Dell 
and HP machines in the past. Any recent sever should do. A single socket 
8 core server and 64GB of ECC ram and some RAID-1 backed SSD storage 
should treat you well. I'm no expert when it comes to DB architecture, 
but I imaging fast storage and high frequency cores would be the name of 
the game there.


Cheers,

Jordan



Re: Recommended web and database server specification

2019-08-14 Thread Tito Mari Francis Escano

Hi Jordan,

Thanks for replying. I apologize I forgot to mention that I was asking 
for the web and database spec because this will be an on-premise 
deployment, cloud platforms are out of the equation. I hope this will 
clarify my concern asking for server specification for a web and 
database server that won't have high traffic but will have a long run.


Thanks again.

On 15/08/2019 12:27 PM, Jordan Geoghegan wrote:


On 8/14/19 7:56 PM, Tito Mari Francis Escano wrote:

Hi to everyone at misc,

I'm recently working on an OpenBSD-based PHP7 web application with 
PostgreSQL-backend for a local government agency and was wondering 
what would you recommend as the acceptable server specification. This 
web application won't reach the Google or Facebook level of visits 
per day, but I was hoping to prepare this be deployed and run for 
quite a long time and ready for about 60,000 visits per day at most.


Your advise and recommendation would be greatly appreciated. Thanks 
so much.





I don't have much experience running php apps in production, but I 
have run a Django app in production using httpd and Postgres. Using a 
basic 4 core VM from Vultr, benchmarks showed it was able to serve 
over 4000 requests per second. With those kind of numbers you could 
easily serve over a million hits per day. It didn't have a lot of 
complex DB activity going on, so the benchmarks were more testing 
httpd and Djangos throughput, but I digress. If you cluster your 
servers, you should be able to hit far more.


Jordan





Re: Recommended web and database server specification

2019-08-14 Thread Jordan Geoghegan



On 8/14/19 7:56 PM, Tito Mari Francis Escano wrote:

Hi to everyone at misc,

I'm recently working on an OpenBSD-based PHP7 web application with 
PostgreSQL-backend for a local government agency and was wondering 
what would you recommend as the acceptable server specification. This 
web application won't reach the Google or Facebook level of visits per 
day, but I was hoping to prepare this be deployed and run for quite a 
long time and ready for about 60,000 visits per day at most.


Your advise and recommendation would be greatly appreciated. Thanks so 
much.





I don't have much experience running php apps in production, but I have 
run a Django app in production using httpd and Postgres. Using a basic 4 
core VM from Vultr, benchmarks showed it was able to serve over 4000 
requests per second. With those kind of numbers you could easily serve 
over a million hits per day. It didn't have a lot of complex DB activity 
going on, so the benchmarks were more testing httpd and Djangos 
throughput, but I digress. If you cluster your servers, you should be 
able to hit far more.


Jordan



Re: Recommended web and database server specification

2019-08-14 Thread Tito Mari Francis Escano

Hello Aaron,

Thanks for responding. The code for the PHP7 web app along with the 
complexity of the database queries like a four table join can be seen 
here: https://github.com/titomarifrancis/dap-dbms. I hope you forgive 
the simplicity of my code, I tried to use a framework but given the time 
and my objective to have a modest server specification for the target 
machine that should won't have heavy traffic, I also wrote the code as 
lightweight as possible.


I was planning to use OpenBSD exclusively for this project, looking 
forward for a long running, secure deployment. Maybe next time I will 
write web app using https://learnbchs.org but I really prefer PostgreSQL.


Hope the info I provided can help define the server specification(s) for 
the project I'm working on. Thanks.


On 15/08/2019 11:21 AM, Aaron Mason wrote:

Hi Tito

Can you tell us more about the database?  How often will its data be
changed, added to, etc? How much data do you have?  How complex are
your DB queries?  These answers will help determine the RAM and
processor requirements for the database.

As for the web server daemon itself, I think Reyk Floeter would be the
best placed to answer that question - also paging Nick Holland for
more hardware expertise.

On Thu, Aug 15, 2019 at 12:57 PM Tito Mari Francis Escano
 wrote:

Hi to everyone at misc,

I'm recently working on an OpenBSD-based PHP7 web application with
PostgreSQL-backend for a local government agency and was wondering what
would you recommend as the acceptable server specification. This web
application won't reach the Google or Facebook level of visits per day,
but I was hoping to prepare this be deployed and run for quite a long
time and ready for about 60,000 visits per day at most.

Your advise and recommendation would be greatly appreciated. Thanks so much.








Re: Recommended web and database server specification

2019-08-14 Thread Aaron Mason
Hi Tito

Can you tell us more about the database?  How often will its data be
changed, added to, etc? How much data do you have?  How complex are
your DB queries?  These answers will help determine the RAM and
processor requirements for the database.

As for the web server daemon itself, I think Reyk Floeter would be the
best placed to answer that question - also paging Nick Holland for
more hardware expertise.

On Thu, Aug 15, 2019 at 12:57 PM Tito Mari Francis Escano
 wrote:
>
> Hi to everyone at misc,
>
> I'm recently working on an OpenBSD-based PHP7 web application with
> PostgreSQL-backend for a local government agency and was wondering what
> would you recommend as the acceptable server specification. This web
> application won't reach the Google or Facebook level of visits per day,
> but I was hoping to prepare this be deployed and run for quite a long
> time and ready for about 60,000 visits per day at most.
>
> Your advise and recommendation would be greatly appreciated. Thanks so much.
>
>


-- 
Aaron Mason - Programmer, open source addict
I've taken my software vows - for beta or for worse



Recommended web and database server specification

2019-08-14 Thread Tito Mari Francis Escano

Hi to everyone at misc,

I'm recently working on an OpenBSD-based PHP7 web application with 
PostgreSQL-backend for a local government agency and was wondering what 
would you recommend as the acceptable server specification. This web 
application won't reach the Google or Facebook level of visits per day, 
but I was hoping to prepare this be deployed and run for quite a long 
time and ready for about 60,000 visits per day at most.


Your advise and recommendation would be greatly appreciated. Thanks so much.