This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

where is the lb worker located?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For all the examples i've seen on Tomcat lb workers, I have yet to discover where this mysterious 'worker' is located. Is it IN my Apache instance? Is it THE apache instance? Is it a SEPARATE tomcat instance other than my instances which are processing the requests?

I feel like everyone knows except me
 
author
Posts: 4223
33
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"nachtstucke",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
Scott
 
Marcus Corvetti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, i changed it.
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"lb" is "load balancing", apparently.

The workers are separate Tomcat instances. Apache (using mod_jk) knows how to distribute requests to multiple instances of Tomcat to serve. You can have multiple workers on one machine, or workers distributed across multiple machines. It's up to you to start and setup the workers, and then you describe them to mod_jk in the worker.properties files.

I'm going to move this to our Apache/Tomcat forum, where any further discussion will be on-topic.
 
Marcus Corvetti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that doesn't really answer my question but thanks anyway.

anyone else? when you define an lb worker in workers2.properties where does this "load balancing worker" come to life? where does the code run?

-m
 
Marcus Corvetti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
according to:

http://tomcat.apache.org/tomcat-3.3-doc/Tomcat-Workers-HowTo.html

"A Tomcat worker is a Tomcat instance that is waiting to execute servlets on behalf of some web server."

A load balancing worker:

"knows how to provide round-robin based sticky load balancing with a certain level of fault-tolerance"

Thereofore if i am trying to load balance across 4 tomcat instances that are forwarded requests from an Apache Web server do i actually need 5 Tomcat instances (one to act as the load balancing worker)??? Or is my Apache web server the "load balancing worker"?

-matt
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that mod_jk itself is where the load-balancing smarts are. Apache acts as the front end; there are N Tomcat workers. There is no privileged instance of Tomcat that coordinates things.
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic