Supose i have a load balancer then 2 web servers again a load balancer then 4 app servers.
Does HTTP response follow the same path as HTTP request to serve?
By path, I assume you been the routing path between nodes in your network.
The response of an HTTP request is sent back to the client via an open TCP connection on the server, typically the same one used to send the request. Whether it takes the same path depends on the configuration of your network. In most cases it would take the same path within your network behind the load balancer. However, this isn't universally guaranteed.
Related
I have 8 different proxy servers that respond to HTTP requests, however, they all connect to their own application servers in the backend. The client doesn't have the ability to route requests to the appropriate proxy.
is it possible to have a load-balancer like haproxy that reads a string in HTTP request payload and redirect to the right proxy?
Any suggestions on an appropriate load balancer for my requirements and related documentation and configuration will be greatly appreciated.
I want to set up a custom proxy that proxies connections to some destinations (inside a network) but not other destinations (in the global internet). Is there any HTTP response the proxy server can send to make the browser connect directly to the requested destination?
For example, I request redirection to Google to my proxy server. The proxy server decides not to proxy, so I get this HTTP response, and my browser connects directly to Google.
You could send a redirect http response code like 302 to redirect the client directly to the website. See: https://moz.com/learn/seo/redirection
I want to write a "smart" load balancer, with "smart" I mean that it should route different request on different servers and ports based on the URL.
As example somehost.com/server1 should go to the server1 while somehost.com/server3 should go to the server3.
However I don't want my load balancer to establish the connection with the client, make the requests to the backend server, and the return to the client.
The load balancer should be as much transparent as possible.
The request should arrive to the backend servers and then return immediately to the client, without the need to go through the load balancer.
How is this achievable ? Are there example in erlang ?
Is it possible to create a HTTP POST that posts to the PHP script that is hosted on a separate unauthenticated FTP server?
No.
POST is an HTTP method, and HTTP requests have a specific protocol structure. FTP, being an entirely different protocol, has an entirely different structure.
FTP servers don't understand HTTP requests, and HTTP servers don't understand FTP requests. (One "server" can handle both, and in such a case would be acting as two distinct services from the perspective of any consuming client.)
If the target page is hosted as a file on an FTP server, then there is no HTTP endpoint to receive the request. There's just a file.
My Question is related to the HTTP Streaming Method for realizing HTTP Server Push:
The "HTTP streaming" mechanism keeps a request open indefinitely. It
never terminates the request or closes the connection, even after the
server pushes data to the client. This mechanism significantly
reduces the network latency because the client and the server do not
need to open and close the connection.
The HTTP streaming mechanism is based on the capability of the server
to send several pieces of information on the same response, without
terminating the request or the connection. This result can be
achieved by both HTTP/1.1 and HTTP/1.0 servers.
The HTTP protocol allows for intermediaries
(proxies, transparent proxies, gateways, etc.) to be involved in
the transmission of a response from server to the client. There
is no requirement for an intermediary to immediately forward a
partial response and it is legal for it to buffer the entire
response before sending any data to the client (e.g., caching
transparent proxies). HTTP streaming will not work with such
intermediaries.
Do I avoid the descibed problems whith proxy servers if i use HTTPS?
HTTPS doesn't use HTTP proxies - this would make security void. HTTPS connection can be routed via some HTTP proxy or just HTTP redirector by using HTTP CONNECT command, which establishes transparent tunnel to the destination host. This tunnel is completely opaque to the proxy, and proxy can't get to know, what is transferred (it can attempt to modify the dataflow, but SSL layer will detect modification and send an alert and/or close connection), i.e. what has been encrypted by SSL.
Update: for your task you can try to use one of NULL cipher suites (if the server allows) to reduce the number of operations, such as perform no encryption, anonymous key exchange etc. (this will not affect proxy's impossibility to alter your data).