Answer the question
In order to leave comments, you need to log in
There is a technology of clustering. How to optimize it?
Situation:
The server has 1 white IP. Server 2 has a gray IP. Server 1 is a free hosting, that's why it is limited: in php many necessary functions are forbidden, in mysql you can have a maximum of two tables of 4 KB each. Server 2 is not restricted, but is located behind the ISP's NAT.
The solution is to use this technology:
1. The user sends a request to the hosting (server 1) and waits for a response.
2. Hosting (server 1) writes the user's request to the table and starts updating it constantly, waiting for a response from server 2.
3. Server 2 constantly updates the request table and when new requests appear, writes its response to this table (if there are no new requests, the server 2 gets a 304 Not Modified error).
4. Hosting (server 1) finds the answer in the table and sends the answer to the user.
Problem:
It would be better if the host (server 1) sends the request to server 2 directly, rather than writing it to a table for server 2 to read later. But how to organize this using free hosting - php, mysql and htaccess, if the server has 2 gray IP?
The technology is designed to store search engine indexing results on a server with a gray IP, and access it through the hosting hash, since the hosting has a high connection speed with the client, and you don’t want to buy a white ip for the server, since it is planned to move the server frequently and every time it will be inconvenient to buy, I also plan to have more than one server, but rather than messing around with ports, hang each server on its own port, it would be better to write a small tunnel in php. I don’t want to use programs for tunneling, since servers can be with different OSes and in general this is a fuss. And besides, I am writing a framework and its users will really like the new feature - this will be one of its chips (the framework should not require any extensions, programs, plugins, etc., except for the php handler and any http server - this is another of his chips and on top of it is a CMS for creating templates and connecting widgets and a control panel, thanks to which you should not worry about setting up, building, installing, debugging, etc. applications is the third feature).
All questions on the topic:
How to use PHP on a hosting with a "white" IP to make an http tunnel to connect to a server with a "gray" IP, which is behind NAT'om?
How to get http access to a server with a gray IP from the Internet by any means?
There is a technology of clustering. How to optimize it?
How to create a persistent tunneling connection using php?
Will NAS timeouts interfere with my tunneling?
Can php receive and immediately process part of a request without waiting for the request to finish receiving?
Can php send information in chunks?
Most recent discussion.
Answer the question
In order to leave comments, you need to log in
With a bunch of your restrictions - no way, teamviewer uses its own servers to switch machines behind NAT, nothing will work without an intermediate point with a white IP.
Very simple.
Put your server on the Internet, connect to it via VPN or SSH tunnel, forward the port.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question