Re: LoadBalancer
Re: LoadBalancer
- Subject: Re: LoadBalancer
- From: André Rothe via Webobjects-dev <email@hidden>
- Date: Thu, 26 Sep 2019 10:34:29 +0200
- Autocrypt: addr=email@hidden; prefer-encrypt=mutual; keydata= mQGiBD3mI7cRBACGgHUTtNs/xDFrXgHhW3AZ572B6mZa9YCcsKdRGkYdbfPgg+9e4vsE6k7f z7hpTc3MbJa/Xiim1ZEXhlLVRKaMHVT7VxTzZKXdb4kM60sG9jd/FevzBZ2H7PNY5Paax1lL rb6GTIWH2ZiTq6aPcKm/kDC/vcCbL24m041kuiRXpwCgveq4BOU+pD9EyZcfquIh0zmetSsD /0CI442mebKcg8E9GJ3ZHmW6OpHAOaxAQOb3QXmU0azmw3cxwzMfT9zwX2O5lBvUUEXiriYb mCqGtNHWzqazyUWOMY0XxpkpxHKuqQ1vaUH4007IUbgtbsE7s8LTk+Xdyl6nyw3jdOZuP3BW AytaDjB2ckfjL67bGVQ8bHMstCYoA/9mPE0wQNfumaHbD2qi8LoOjQR+JRI40/9odU7MZiKX XkyrlrvOTRuQXNzqyTLGBU2VMGrsz8A2jgvRkDjK7/edbBDhbo89go93105pExrH9cQmFLe4 YdSK+pO23NGS0zDKxGHaX0L73kaOvSdLCtejMDWIvljWDXToUerin+Faw7Q1QW5kcmUgUm90 aGUgKG9mZmljZSkgPGFuZHJlLnJvdGhlQHprcy51bmktbGVpcHppZy5kZT6IYwQTEQIAIwIb AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheABQJMEjSEAhkBAAoJECAEMVmkvUsCCzAAoLJZMPjD qsmv7dDmwONZf3fvVabCAJ0UyXgpcNXGI8k9LNtjpUYiMqR9U7kCDQQ95iPUEAgAlQ6PhmI4 bj//NNbPPKvUM/D/wY7nr4kSmor2YnZW62mzRPJ0wZchgMU36cMPo4HK71aKF+Jvvmsxj/UT WwVgt4uf4VgVZ5DNUlNMr8kmpeBQFWrUmLrIH/s7ZOjd9fsYZT6InkN5zHiSlNNQdRmSCi0B Xw+qVrK8UNdf9lEPmW0x1ABe4f/QFWIevCZaz5nvEt4+n37//aOsdbP0bedOh+CtXV3YdTd+ Z618RHrJDugA3KorgZjhrug6iBaK0lEDQ0SI2YV3m0569F9hkjVbXH1Wxv9dV+QyT6uWuBmO Isa6drzPp+RRrUKZoYO6AKYxTY2cYBVJ+KxaeWNYzK9+OwADBgf/bw/dboyTWxWEuRcbV60z 4fFwv1Zn30QCI+eMG2B62E3SPFLxNBjMhoH7gat1/QE1fDw1E6FaImPvUQP91EcVFOxMK1it QboHYOyZ9P+SKBE8rv1EYedbrPGu4EP+BxPnUymnzEqJ49DJgmIH6Hv6zoFzZB4Z6SPoZFJ2 8Znmngt/ZGEurf0x1YgPKhvD14QmKqK3KdBiVyv0q26/1cGG+kIe9suLUYVFrQcaujY5u/a+ +wmyvcjPeiCQ1Hl4FNm+7HXM7XbX1I23KBZbDKr3/SzNllFN7TyYOf6RbRjVw+vcdT2WCZ/H XKGdVkMwLf3OybmTDh/WupMn3Q+yd5E0PYhGBBgRAgAGBQI95iPUAAoJECAEMVmkvUsC2PoA oKWTxzXqJPv1Zun+dHHBb80TYMjIAJwLV33f6IleaUTQ8LjsKt15K75AUA==
- Openpgp: preference=signencrypt
I have found the implementation of the scheduler algorithms within
mod_webobjects.
See Adaptor/loadaverage.c, random.c and roundrobin.c
There you can see, that multiple http servers can send requests to
application instances, but every http server holds its own index. So the
balancing will not be perfect over multiple servers:
From roundrobin.c:
"There can be a problem with R/R when multiple http servers (with
WebObjects adaptors) are forwarding requests to instances: each
server/adaptor maintains its own index for round robin. This use of
adaptor local data can cause undesired r/r behaviour - including the
worst case: each server/adaptor sending requests to the same instance."
LoadAverage works in a similar way, as you can see within the code, some
responses from the application will contain additional headers, which
contain information about the state of the instance (defined within
config.h):
x-webobjects-loadaverage
x-webobjects-refusenewsessions
With these headers the balancer can better decide, which instance should
be used. But the values will be cached on the current mod_webobject
adaptor, so the next request on another http server will use its own old
cached values for the decision (updated within loadaverage.c
la_finalize() after the decision).
As I understand the code, the decision bases on the cached values, which
will be updated after the request is bound to the chosen instance. But
the cached values will not mirror the changes made by the other http
servers and their mod_webobjects for the current request (only for the
next request).
~André
Am 24.09.19 um 16:02 schrieb Michael Kondratov via Webobjects-dev:
> Yes
>
> Sent from my iPhone
>
>> On Sep 24, 2019, at 4:52 AM, Mark Gowdy <email@hidden> wrote:
>>
>> Does that work across multiple machines?
>>
>>> On 10 Sep 2019, at 20:53, Michael Kondratov via Webobjects-dev
>>> <email@hidden
>>> <mailto:email@hidden>> wrote:
>>>
>>> Daniel,
>>> It is pretty easy. It is worth looking into
>>> enabling ERJGroupsSynchronizer.
>>>
>>> er.extensions.remoteSynchronizer=er.jgroups.ERJGroupsSynchronizer
>>> er.extensions.jgroupsSynchronizer.multicastAddress=230.0.0.1
>>> jgroups.udp.mcast_port=9755
>>>
>>> That will synchronize changes across instances.
>>>
>>> Michael
>>>
>>>
>>>> On Sep 10, 2019, at 3:44 AM, daniel.bietenbeck--- via Webobjects-dev
>>>> <email@hidden
>>>> <mailto:email@hidden>> wrote:
>>>>
>>>> Hi there,
>>>>
>>>> small side question to the topic.
>>>>
>>>> Is there a good tutorial for upgrading an application from single
>>>> instance to multi instance? common pitfalls etc.?
>>>>
>>>> Best regards,
>>>> Daniel Bietenbeck
>>>> Leiter IT
>>>> *...**fröbus *
>>>> Medien. Dienst. Leistung.
>>>>
>>>> Julius Fröbus GmbH • Schanzenstr. 6-20 • Werkstatt 1.09 • 51063 Köln
>>>> • Deutschland
>>>> Phone: +49 (0) 221 346 35 137 • Fax: +49 (0) 221 346 35 200
>>>> email@hidden
>>>> <mailto:email@hidden> • www.froebus.de
>>>> <http://www.froebus.de/>
>>>>
>>>> Geschäftsführung: Gerd Hecheltjen, Frank Bayerl
>>>> Amtsgericht Köln • HRB 1118 • Finanzamt Brühl • UST-IdNr. DE 122788692
>>>>
>>>>> Am 09.09.2019 um 23:48 schrieb Morris, Mark via Webobjects-dev
>>>>> <email@hidden
>>>>> <mailto:email@hidden>>:
>>>>>
>>>>> Hi André,
>>>>>
>>>>> If in reality the situation is as simple as your example, perhaps
>>>>> you could just create a separate single instance with a distinct
>>>>> name for your “defined instance", and use that for requests that
>>>>> require it. We do something like that for certain special situations.
>>>>>
>>>>> Regards,
>>>>> Mark
>>>>>
>>>>>> On Sep 9, 2019, at 3:06 PM, André Rothe via Webobjects-dev
>>>>>> <email@hidden
>>>>>> <mailto:email@hidden>> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> In the JavaMonitor I found the LoadBalancer properties. We use
>>>>>> "Round Robin" for our application, but I asked myself, how I could
>>>>>> implement a custom scheduler for a specific problem (multiple
>>>>>> instances of an application, but some requests should always use a
>>>>>> defined instance, all all other requests should be redirected and
>>>>>> balanced between the other instances). Is there an interface,
>>>>>> which my scheduler has to implement?
>>>>>>
>>>>>> Thank you
>>>>>> André
>>>>>> _______________________________________________
>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>> Webobjects-dev mailing list (email@hidden
>>>>>> <mailto:email@hidden>)
>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>
>>>>>> This email sent to email@hidden
>>>>>> <mailto:email@hidden>
>>>>>
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Webobjects-dev mailing list (email@hidden
>>>>> <mailto:email@hidden>)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>
>>>>> This email sent to email@hidden
>>>>> <mailto:email@hidden>
>>>>
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list (email@hidden
>>>> <mailto:email@hidden>)
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> This email sent to email@hidden
>>>> <mailto:email@hidden>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list (email@hidden
>>> <mailto:email@hidden>)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden <mailto:email@hidden>
>>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
UNIVERSITÄT LEIPZIG
Medizinische Fakultät
Zentrum für Klinische Studien Leipzig – KKS
André Rothe
CIO
Härtelstr. 16-18, 04107 Leipzig
Tel: 0341/ 97 16118
Fax: 0341/ 97 16189
WWW: http://www.zks.uni-leipzig.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Re: LoadBalancer (From: Michael Kondratov via Webobjects-dev <email@hidden>) |