click icon indicating copy to clipboard operation
click copied to clipboard

Flow based Load Balancer

Open p4pe opened this issue 4 years ago • 7 comments

Hello everyone, I want to create a flow-based load balancer. LB

Which elements should I use to be able to implement this functionality?

Thank you

p4pe avatar Aug 04 '21 09:08 p4pe

IPRewriter, like a NAT, with something like RoundRobinIPMapper for pattern

tbarbette avatar Aug 04 '21 10:08 tbarbette

Hello @tbarbette thank you for your response.

Sorry for the late reply.

To be more precise, I would like to implement something like ECMP protocol. I don't know if this can be done with Click. In my example, the VNF1 and VNF2 are simply forwarding the traffic to sink. ECMP

Thank you!

p4pe avatar Aug 30 '21 14:08 p4pe

Remember ECMP is per-packet, so you would break flows and VNFs would see part of multiple flows, so they can't run NAT etc. But if you don't want something flow-aware, then you can simply use RoundRobinSwitch that will forward packets in a RR fashion.

tbarbette avatar Sep 03 '21 14:09 tbarbette

To be flow-aware, but independent of load, you have HashSwitch. To do RoundRobin you need the aforementioned solution.

Tom

tbarbette avatar Sep 03 '21 14:09 tbarbette

Hello Tom,

Today I saw the RoundRobinSwitch element, thank you for the confirmation.

So I can have:

in1::FromDevice()
in2:FromeDevice()

out::ToDevice
out1::ToDevice

lb::RoundRobinSwitch

And the inputs of the lb will be the in1 and in2 (after they passed from IPClassifier, etc..)

Am I right?

p4pe avatar Sep 03 '21 15:09 p4pe

Yes, with the usual Queue etc

tbarbette avatar Sep 03 '21 15:09 tbarbette

Hello Tom,

Today I saw the RoundRobinSwitch element, thank you for the confirmation.

So I can have:

in1::FromDevice()
in2:FromeDevice()

out::ToDevice
out1::ToDevice

lb::RoundRobinSwitch

And the inputs of the lb will be the in1 and in2 (after they passed from IPClassifier, etc..)

Am I right?

Hello , I also want to create a per-packet load balancer, but it was a little difficult for me to implement it ,can you share the .click file? Thank you very much in advance. my email is [email protected]

xt1234567 avatar Apr 01 '22 10:04 xt1234567