Hello everyone, I will explain my current situation and with your help try to understand and solve my problem.
I currently have a VPS with 64gb of ram running Centos 7 Os, in this VPS I use apache / mysql for my applications.
I followed some internet tutorials to install apache, configure the domain in the vps, add SSL, and configure mysql.
I have no sites running, only API pages that are basically the following ...
App request (GET or POST) > PHP page get this data > PHP page make query on mysql > PHP page returns json to my apps.
it currently works ok with apache.
the problem comes now.
I am currently receiving many simultaneous accesses, millions and millions, my VPS is reaching the peak of CPU and RAM usage, I tried to follow some tutorials to tune Apache and mysql for this number of accesses and I was not successful.
I tried to switch to ngix, I got a significant performance improvement, less use of resources and more access. however my knowledge for this number of accesses is limited.
Today even with ngix configured, it reached a peak of 64 gb of ram and 100% of CPU usage, I will ask for an increase in server resources, maybe 128gb of ram but before doing this I wanted to see if the B4J maybe help here.
I have no knowledge of server, much less advanced apache and ngix, I wanted to try some solution with B4X
I will ask a series of questions, some are already on the forum, but even so I would like to confirm if you can answer me.
Questions about B4J Server on VPS
1 - Is the B4J server ready to receive millions and millions of simultaneous accesses?
Is this tutorial ready to receive this number of simultaneous accesses or would it have to be configured and a different way to meet the number of accesses?
if you have to configure something to receive large numbers of hits, could you tell me how to do it?
2 - In the b4j server is it possible to point a domain and also configure an ssl certificate in an easy way? (https://www.something.com)
in apache this part was relatively easy, there are several tutorials on the internet, to set up a domain just edit some text files and that's it.
ssl is even easier, just use certbot, with a command line you install and it already configures a free ssl certificate.
how is this part in B4J? easy to install domain and ssl on a vps?
3 - what are the ways to configure a VPS to use B4J from the beginning?
let's assume I rented a new VPS, there is nothing in it yet.
would i have to install JAVA and MYSQL just right? once you install both just run the created .jar (server) and you're done?
4 - Is it worth it today to migrate from apache / ngix to B4J? can anyone here who has a lot of access tell me if it is worth switching to B4J? performance, number of accesses etc ...
5 - what happens when the number of accesses reaches the top in B4J (100% cpu and ram)?
in apache there is a queuing system, requests that cannot be answered at the moment enter a queue which ends up resulting in error 500 for some people, slowness etc ...
In a few moments apache stops working when ram and cpu reaches maximum, I have to manually reset it.
What would happen if at B4J I reach the maximum resources of the VPS?
6 - in apache there is a queuing system, when there are many requests at the same time, some get in a queue to be answered later, is B4J prepared for this? queuing system etc ...? do i need to configure something or is it ready?
7 - is it possible in B4J to receive a value via get or post and depending on the action do querys and return in json?
currently I don't have many pages in php, it is usually a single page, which connects to the mysql and also receives an action, depending on the action it makes a query and returns to the app.
for example
www.site.com/page.php?action=register
www.site.com/page.php?action=login
8 - B4J and MYSQL
even if the B4J supports and is prepared for everything I asked above. maybe mysql is not.
What would be the best way to configure mysql with b4j in this situation of many accesses?
9 - the b4j support headers values on the request?
on the apache/php i send via app some headers like login, values etc... the B4J server is ready to get this value easy?
I thank everyone
I remember again that I don't have advanced knowledge in programming, much less in the server (I didn't complete school). what I did until today was trying and trying.
any help is welcome...
I currently have a VPS with 64gb of ram running Centos 7 Os, in this VPS I use apache / mysql for my applications.
I followed some internet tutorials to install apache, configure the domain in the vps, add SSL, and configure mysql.
I have no sites running, only API pages that are basically the following ...
App request (GET or POST) > PHP page get this data > PHP page make query on mysql > PHP page returns json to my apps.
it currently works ok with apache.
the problem comes now.
I am currently receiving many simultaneous accesses, millions and millions, my VPS is reaching the peak of CPU and RAM usage, I tried to follow some tutorials to tune Apache and mysql for this number of accesses and I was not successful.
I tried to switch to ngix, I got a significant performance improvement, less use of resources and more access. however my knowledge for this number of accesses is limited.
Today even with ngix configured, it reached a peak of 64 gb of ram and 100% of CPU usage, I will ask for an increase in server resources, maybe 128gb of ram but before doing this I wanted to see if the B4J maybe help here.
I have no knowledge of server, much less advanced apache and ngix, I wanted to try some solution with B4X
I will ask a series of questions, some are already on the forum, but even so I would like to confirm if you can answer me.
Questions about B4J Server on VPS
1 - Is the B4J server ready to receive millions and millions of simultaneous accesses?
[WebApp] Web Apps Overview
B4J v2.00 adds support for web applications based on WebSocket technology. With WebSocket The browser and the server maintain an open communication channel. This channel allows us to build web apps where all (or most) of the logic is implemented in the server. The new framework is implemented...
www.b4x.com
if you have to configure something to receive large numbers of hits, could you tell me how to do it?
2 - In the b4j server is it possible to point a domain and also configure an ssl certificate in an easy way? (https://www.something.com)
in apache this part was relatively easy, there are several tutorials on the internet, to set up a domain just edit some text files and that's it.
ssl is even easier, just use certbot, with a command line you install and it already configures a free ssl certificate.
how is this part in B4J? easy to install domain and ssl on a vps?
3 - what are the ways to configure a VPS to use B4J from the beginning?
let's assume I rented a new VPS, there is nothing in it yet.
would i have to install JAVA and MYSQL just right? once you install both just run the created .jar (server) and you're done?
4 - Is it worth it today to migrate from apache / ngix to B4J? can anyone here who has a lot of access tell me if it is worth switching to B4J? performance, number of accesses etc ...
5 - what happens when the number of accesses reaches the top in B4J (100% cpu and ram)?
in apache there is a queuing system, requests that cannot be answered at the moment enter a queue which ends up resulting in error 500 for some people, slowness etc ...
In a few moments apache stops working when ram and cpu reaches maximum, I have to manually reset it.
What would happen if at B4J I reach the maximum resources of the VPS?
6 - in apache there is a queuing system, when there are many requests at the same time, some get in a queue to be answered later, is B4J prepared for this? queuing system etc ...? do i need to configure something or is it ready?
7 - is it possible in B4J to receive a value via get or post and depending on the action do querys and return in json?
currently I don't have many pages in php, it is usually a single page, which connects to the mysql and also receives an action, depending on the action it makes a query and returns to the app.
for example
www.site.com/page.php?action=register
www.site.com/page.php?action=login
8 - B4J and MYSQL
even if the B4J supports and is prepared for everything I asked above. maybe mysql is not.
What would be the best way to configure mysql with b4j in this situation of many accesses?
9 - the b4j support headers values on the request?
on the apache/php i send via app some headers like login, values etc... the B4J server is ready to get this value easy?
I thank everyone
I remember again that I don't have advanced knowledge in programming, much less in the server (I didn't complete school). what I did until today was trying and trying.
any help is welcome...