lipinggm / tlb

Automatically exported from code.google.com/p/tlb
0 stars 0 forks source link

Bundle Server and Balancer #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For someone who is just getting started with TLB, to see it in action (with 
true balancing), one has to setup the server and at least two balancers. It 
means I need to run a total of three processes.

Can we simplify this setup? Ideally, I would just like to start a single 
process. My suggestion is to start a single server which can also act as a 
balancer. The server will need to expose the balancer routes with some 
mechanism to identify the partition number.

I understand the need for the balancer to be separate from the server. It 
allows you to scale out so that the server does not become the bottleneck. 
But as a user, I would like a choice of when to scale out. When using TLB as a 
first time user, I am usually open to trade performance for simplicity of setup.

What do you guys think?

Original issue reported on code.google.com by mrajesh...@gmail.com on 30 Jul 2011 at 4:13

GoogleCodeExporter commented 9 years ago
The problem with this is, balancer uses environment variables to decide a lot 
of things(for instance, partition number and total partitions etc). So a 
balancer spin-up is actually very specific to the partition launched. The 
upside of this is, http calls between balancer-server and test runner do not 
have to worry about any details(it doesn't need to tell balancer what partition 
it is, and what job-name/version etc). And, the other upside is, balancer 
doesn't need to be thread safe in terms of maintaining multiple environments 
for different partitions(or job-names for that matter). 

The downside is, it needs to be invoked at the partition level(each partition 
bringing up its own balancer, running its tests and then killing it in the 
end). 

Its more interesting to think of balancer as a library. 
Test-framework/build-tool specific libraries just link to this(ignore the fact 
that the actual communication happens over http using a flat-text payload, its 
like linking to pthread for instance, using -lpthread :-) ). It can't actually 
be a library because its a java app and supported environment may be non-java, 
but its written to behave like one.

Original comment by singh.janmejay on 1 Aug 2011 at 4:16