simple way to access application in multi instance envirnoment
hello, i'm running a server with multiple instance of tomcat each instance has some apps deployed accessed with host:port like myhost.com:/app1 myhost.com:/app2 myhost.com:/app3 is there any way to hide the port from users making app URL simpler with keeping multi instance ??? like this or any thing near app1.myhost.com app2.myhost.com app3.myhost.com thanks in advance
Re: simple way to access application in multi instance envirnoment
On Sun, Mar 9, 2014 at 2:13 PM, Daniel Mikusa dmik...@gopivotal.com wrote: On Mar 9, 2014, at 8:08 AM, Ahmed Dalatony ahmed.dalat...@gmail.com wrote: hello, i'm running a server with multiple instance of tomcat each instance has some apps deployed accessed with host:port like myhost.com:/app1 myhost.com:/app2 myhost.com:/app3 is there any way to hide the port from users making app URL simpler with keeping multi instance ??? like this or any thing near app1.myhost.com app2.myhost.com app3.myhost.com Maybe virtual hosting? http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html Dan thanks in advance hello, can you help me little more with example or simpler doc i'm new to tomcat config and i don't understand virtual host thank you
Re: simple way to access application in multi instance envirnoment
On Sun, Mar 9, 2014 at 5:05 PM, Neven Cvetkovic neven.cvetko...@gmail.comwrote: Ahmed, On Sun, Mar 9, 2014 at 10:14 AM, Ahmed Dalatony ahmed.dalat...@gmail.com wrote: hello, can you help me little more with example or simpler doc i'm new to tomcat config and i don't understand virtual host thank you Ultimately, if you don't want to show the port number to the end user, the serving process needs to bind to port 80. You mentioned few Tomcat processes, bound to ports , , , each serving few applications. So, here are few alternatives to achieve what you want: ALTERNATIVE_0 - Don't do anything. Each Tomcat instance runs on it's own port number. - Doesn't achieve what you want :) ALTERNATIVE_1 - Host all applications on a single Tomcat instance. Bind Tomcat to port 80 (if linux environment remember port 80 is privileged port, so you have to configure your Tomcat accordingly.) Register all domains to the same IP address. - You can use Tomcat virtual hosting to register different domains to specific applications. - Downside of this approach is that all applications are sharing the same JVM (Tomcat) instance. Spike in one application can bring all other applications down. ALTERNATIVE_2 - Have multiple network interfaces (IP addresses) available. Bind each Tomcat instance to one of the IP addresses. Register each domain to its own IP address. - This approach is better than ALTERNATIVE_1 when it comes to isolation of the processes in their own execution environments. - This approach utilizes many IP addresses, that are usually scarce and not easily justified for numerous applications. ALTERNATIVE_3 - Most common approach I've seen around. - Similar to approach you are currently taking (ALTERNATIVE_0), with a help of external web server that will act as a (reverse) proxy. Typically, I would use Apache Httpd server, but you can use other web servers, e.g. IIS on Windows platform, or nginx. - In this case Apache (or other webserver) would bind to port 80, and based on the requested URL (or host) would point to a specific application (hosted on specific Tomcat on certain port, e.g. , , , etc...) - If you would like to achieve that different hosts point to different applications, register all domains with the same IP address in DNS, and configure virtual hosting on the webserver. Thus, if you run multiple instances of Tomcat - alone, virtual hosting will not help you , since only one process can bind to a single IP address to one port (e.g. port 80). So, either put everything to the same Tomcat (yuck), or bind each tomcat to port 80 on separate IP addresses, or have an external web server routing requests to your multiple Tomcat instances. My preference is the later approach. Here are some questions you want to answer before choosing the alternative: - What is the environment that you run on (windows, linux, etc.)? - What are you requirements? - How many applications do you have? How many instances do you plan to run, on the same machine, on the entire platform? - What are the application usage patterns? (how many users do you plan to serve, spikes, etc..) - What are the service level agreements you have with your customers? - etc... Configuring webserver to route requests to Tomcat instances is pretty straight forward, and you have a choice of HTTP or AJP protocols and depends on the choice of your webserver (Apache HTTPD, IIS, nginx, etc.) Hope that helps. Cheers! Neven thanks Dan Neven i think 3rd alternative is my way to go i'll start searching about it and see what i get
Re: simple way to access application in multi instance envirnoment
On Sun, Mar 9, 2014 at 7:48 PM, Neven Cvetkovic neven.cvetko...@gmail.comwrote: On Sun, Mar 9, 2014 at 11:29 AM, Ahmed Dalatony ahmed.dalat...@gmail.com wrote: On Sun, Mar 9, 2014 at 5:05 PM, Neven Cvetkovic neven.cvetko...@gmail.comwrote: Ahmed, On Sun, Mar 9, 2014 at 10:14 AM, Ahmed Dalatony ahmed.dalat...@gmail.com wrote: hello, can you help me little more with example or simpler doc i'm new to tomcat config and i don't understand virtual host thank you What environment do you use? e.g. Windows, Linux, etc. If Linux, what flavour of Linux? e.g. RHEL (CentOS, Fedora), Ubuntu, etc. What webserver would you like to use? e.g. Apache HTTPD, IIS, nginx, etc. They all have different ways to configure your setup. - The easier one to setup is to use mod_proxy, check examples here: https://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html - More common is to use AJP protocol and mod_jk in Apache, check examples here: http://tomcat.apache.org/connectors-doc/generic_howto/quick.html http://tomcat.apache.org/connectors-doc/reference/apache.html Hope that helps. n. hello, I'm using win server 2008 running a combination of tomcat 6, tomcat 7, oc4j 10g on different ports the resources you supplied are very handy but they explain accessing http://www.myhost.com:/App1 from http://www.myhost.com/App1 is it applicable to be accessed from URL like this http://App1.myhost.com thanks,
tomcat 7 for production
hello all, i'm planning to use tomcat in production server which version is ready for production use ??? thank you
Re: tomcat 7 for production
hello thnx for fast reply but i'm meaning which release as i see in change log that there is a side text beside each release like 7.0.51 not released 7.0.50 released 2014-01-08 in other meaning should i go directly to latest release of tomcat 7 which is 7.0.52 or there is more stable production ready release??? thank you, On Sun, Mar 2, 2014 at 9:33 PM, David Kerber dcker...@verizon.net wrote: On 3/2/2014 2:14 PM, Ahmed Dalatony wrote: hello all, i'm planning to use tomcat in production server which version is ready for production use ??? thank you The latest released version of 7.0.x is the way to go. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org