Is this a B4J server? How many clients are requesting information in peak hours? Might be better to use WebSockets instead of polling the server.No problem with ram , but on peak hours my both cores are nearly full.
Is this a B4J server? How many clients are requesting information in peak hours? Might be better to use WebSockets instead of polling the server.
There are several issues involved with hosting your own server:
1. The upload bandwidth, which is the important metric for servers, is usually limited.
2. Reliability. Do you suffer from electrical outages or network issues from time to time?
I think that a home server should only be considered if it is not possible to use a remote server (the UI cloud is such an example) or for small solutions.
I am using a linux vps. I think I misdescribed the situation. There is no other server. I host a domain on this vps and this domain has many php files which my apps use it to get info from the mysql database. Also this server use a b4j generated jar file to send http requests everysecond to a remote server to get finance data and write the results to my mysql server.What is the server doing? How is it implemented?
Are you talking about Http reqests For getting data from the remote server and store those values in my database ?I would start with switching to a WebSocket server instead of polling the server every 2 seconds. It will be much more efficient.
this is why i pay much for a professional finance data. I dont think there is a problem with sending http request every second, what option do i have to get data that changes every second and which they told me to send http reuests to get the latest data.tufanv,
you can call yourself lucky that they didn't ban your IP yet for doing so much frequent requests. that's almost DDOSing you're doing.
yes but every http request consumes cpu and when there are 200 300 people requesting at the same time , makes problem for me =)if that is what they prefer then you're fine I guess. hopefully their firewall keeps the gate open then
No. If I understand correctly the mobile app sends a request to the server every 2 seconds. With WebSockets the server can notify the connected clients when needed. So polling is not required.Are you talking about Http reqests For getting data from the remote server and store those values in my database ?
I don't think it is enabled by default. When I update a php code, the cache has to be cleared everytime I think , is that correcT ?No. If I understand correctly the mobile app sends a request to the server every 2 seconds. With WebSockets the server can notify the connected clients when needed. So polling is not required.
BTW, have you enabled opcache on your Apache server? If not then you should. It will make the server run 10 times faster.
No. It will happen automatically.When I update a php code, the cache has to be cleared everytime I think , is that correcT ?
Thanks Erel , I have enabled it. Will try for some time !No. It will happen automatically.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?