Opened 9 months ago

Closed 6 months ago

#5456 closed enhancement (complete)

HA: Implement load balancing algorithm

Reported by: tomek Owned by: marcin
Priority: medium Milestone: Kea1.4
Component: high-availability Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

The HADesign calls for a load balancing algorithm with assigning appropriate classes to the received packet.

Subtickets

Change History (7)

comment:1 Changed 6 months ago by marcin

  • Owner set to marcin
  • Status changed from new to accepted

comment:2 Changed 6 months ago by marcin

  • Owner changed from marcin to UnAssigned
  • Status changed from accepted to reviewing

Both load balancing and hot-standby modes are now operational. The servers filter out queries which should be processed by their peers. The packets are filtered in the pkt4_receive callout.

Proposed ChangeLog entry:

XX.	[func]		marcin
	Implemented load balancing and hot standby mode of operation
	in libkea-ha. The DHCP server instances drop queries which
	are to be processed by their partners.
	(Trac #5456, git cafe)

comment:3 Changed 6 months ago by tmark

  • Owner changed from UnAssigned to tmark

comment:4 follow-up: Changed 6 months ago by tmark

  • Owner changed from tmark to marcin

For the most part the changes are fine.

I altered the wording of a log message slightly, so please pull first. Two general questions:


What determines the order that callouts for a given hook point are invoked?
Not that I have use case for it, but suppose someone has HA along with other
hook libs that implement pkt4_receive(). Something determines the order
they'll get invoked, is it order the hook libs are loaded?

If so, that is entirely fine but we should make it clear in HA, what
the order is and that other hooks might interfere?


makeScopeClass()

Currently, subnets,pools, etc only support a single class within
"client-class" right? So in an HA server, client-classification
as far as subnet/pool selection is concerend is limited to HA
server scope class. Is that accurate?


comment:5 in reply to: ↑ 4 ; follow-up: Changed 6 months ago by marcin

  • Owner changed from marcin to tmark

Replying to tmark:

For the most part the changes are fine.

I altered the wording of a log message slightly, so please pull first. Two general questions:

Thanks for turning my Polglish into English.


What determines the order that callouts for a given hook point are invoked?
Not that I have use case for it, but suppose someone has HA along with other
hook libs that implement pkt4_receive(). Something determines the order
they'll get invoked, is it order the hook libs are loaded?

If so, that is entirely fine but we should make it clear in HA, what
the order is and that other hooks might interfere?

I have added a commentary to the pkt4_receive implementation. The documentation for the HA is not ready. It may be useful to highlight this problem there when it is created. One other thing we should consider is to add some guidelines for hook libraries implementers to propagate "next step status" between the loaded libraries.


makeScopeClass()

Currently, subnets,pools, etc only support a single class within
"client-class" right? So in an HA server, client-classification
as far as subnet/pool selection is concerend is limited to HA
server scope class. Is that accurate?

That's correct, but the huge ticket I am currently reviewing for Francis, i.e. #5374, extends this to multiple classes. So, we will be fine when we complete #5374.


comment:6 in reply to: ↑ 5 Changed 6 months ago by tmark

  • Owner changed from tmark to marcin

Replying to marcin:

Replying to tmark:

For the most part the changes are fine.

I altered the wording of a log message slightly, so please pull first. Two general questions:

Thanks for turning my Polglish into English.

You bet!


What determines the order that callouts for a given hook point are invoked?
Not that I have use case for it, but suppose someone has HA along with other
hook libs that implement pkt4_receive(). Something determines the order
they'll get invoked, is it order the hook libs are loaded?

If so, that is entirely fine but we should make it clear in HA, what
the order is and that other hooks might interfere?

I have added a commentary to the pkt4_receive implementation. The documentation for the HA is not ready. It may be useful to highlight this problem there when it is created. One other thing we should consider is to add some guidelines for hook libraries implementers to propagate "next step status" between the loaded libraries.

Agreed. Commentary is good.


makeScopeClass()

Currently, subnets,pools, etc only support a single class within
"client-class" right? So in an HA server, client-classification
as far as subnet/pool selection is concerend is limited to HA
server scope class. Is that accurate?

That's correct, but the huge ticket I am currently reviewing for Francis, i.e. #5374, extends this to multiple classes. So, we will be fine when we complete #5374.

Ok, I sort of thought was the case.


Ready to merge.

comment:7 Changed 6 months ago by marcin

  • Resolution set to complete
  • Status changed from reviewing to closed

Merged with commit 3919d9651db45fc331d15295393f12ee1d3bbe94

Note: See TracTickets for help on using tickets.