Ronald van Tour
|
|
« on: September 07, 2010, 08:54:46 AM » |
|
Hi
We have 5 RTC servers Running on the same PC, using ports 90 91 92 93 94.
Is there a way to use at the client side port 80 and then at the server side routed the client to the right server.
|
|
|
Logged
|
|
|
|
D.Tkalcec (RTC)
|
|
« Reply #1 on: September 07, 2010, 09:35:42 AM » |
|
You could use TRtcDataRouter or TRtcLoadBalancer components to have the Server which is running on Port 80 forward requests to the other Servers (depending on the URIs received), but I'm wondering if there are any reasons why you couldn't simply compile all your Server-side code into a single RTC Server application and have it all running on Port 80.
If your clients need to access all the functionality provided by your Server(s) and all your Servers are running on the same PC, I would recommend you to compile all your Server-side code into a single RTC Server application, in which case there will be no need for data routing and forwarding. Even though you can also get the job done by using a router or load balancer in-between your Clients and your Servers, I really don't see any advantages of doing this when all the Servers are running on the same PC.
Best Regards, Danijel Tkalcec
|
|
|
Logged
|
|
|
|
Ronald van Tour
|
|
« Reply #2 on: September 07, 2010, 09:41:31 AM » |
|
We use different servers because we do not have to stop the server if we have an update for another server and we have no risk that an existing server will not work anymore.
|
|
|
Logged
|
|
|
|
D.Tkalcec (RTC)
|
|
« Reply #3 on: September 07, 2010, 10:02:57 AM » |
|
Ok. If it is very important for you to be able to restart one Server application while the other Server applications are still running, but you also want all your Clients to use Port 80, then you should take a look at the RTC Router and Load Balancer demos.
I'd recommend you to create a Service project and use an INI file to configure the Load Balancer on your customers site, but to get a head start and see how this will work you can simply use the RTC Load Balancer Demo v3 (pre-configure it by entering your Server data into the memo).
Best Regards, Danijel Tkalcec
|
|
|
Logged
|
|
|
|
Ronald van Tour
|
|
« Reply #4 on: September 07, 2010, 08:17:10 PM » |
|
Danijel
I am testing now with the RTC loadbalancer v3 I am running a client and the Load Balancer on the same pc. [localhost and port 80]
Host/Path etc.
/ 0 0 0 10.0.0.215:93/ 0 0 0 ( for that client that works fine the RTC server is on 10.0.0.215:93 )
I do not have a clear picture yet of how to use "Web Application root URI on the Server" and virtual host and virtual Path
It is working now with one client but I have it not working with more clients yet
|
|
|
Logged
|
|
|
|
D.Tkalcec (RTC)
|
|
« Reply #5 on: September 07, 2010, 10:03:08 PM » |
|
You probably mean to say that it's working with one Server (the one running on port 93), not with only one Client (unless you have limited the maximum number of client connections).
To make it working with multiple Servers, you need to map incoming URIs to outgoing URis. That is the purpose of Virtual Path and Root URI parameters. Virtual Path is the incoming URI, while "Web Application root URI" is the outgoing URI on the Server. If you want the routing to be transparent for the Clients (so you do not have to make any changes in your Clients), Virtual Path and Root URI will have to be the same.
For example, if you have a TRtcServerModule in a Server and the "ModuleFileName" property on that TRtcServerModule component is set to "/XYZ" then one version of Root URI and Virtual Path parameters for that Server will need to be "/XYZ", like ... /XYZ 0 0 0 10.0.0.215:93/XYZ 0 0 0
If another Server is running on Port 92 and uses a TRtcServerModule with "ModuleFileName" property set to "/ABC", then you would add something like this to the Server list ... /ABC 0 0 0 10.0.0.215:92/ABC 0 0 0
An alternative to this would be to change your Clients to extend their ModuleFileName and Request.FileName properties to access your Server-side code at different locations and then map one Virtual Path to one Servers root, like ... /XYZ 0 0 0 10.0.0.215:93/ 0 0 0 /ABC 0 0 0 10.0.0.215:92/ 0 0 0
Please note that load balancer has to be configured like that because it needs to know which requests should be forwarded to which Server. If you would only enter multiple Server addresses and make them all accessible through the root URI (/) then the Load Balancer would assume that all these Servers are running the same "web applications" and would distribute the load evenly across all Servers. But since you have a different application running on each Server, you need to explicitly define which requests should be forwarded to which Server. You only have to do that for the parent URIs and not for every single URI.
If you have more questions, feel free to ask.
Best Regards, Danijel Tkalcec
|
|
|
Logged
|
|
|
|
Ronald van Tour
|
|
« Reply #6 on: September 08, 2010, 07:11:27 PM » |
|
Danijel, Thank you. This works perfect !!
|
|
|
Logged
|
|
|
|
|