You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/README.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,19 +216,45 @@ kubectl annotate service my-service "kube-router.io/service.hairpin="
216
216
### Direct server return
217
217
218
218
You can enable DSR(Direct Server Return) functionality per service. When enabled service endpoint
219
-
will directly respond to the client. When DSR is enabled Kube-router will uses LVS's tunneling mode to achive this.
219
+
will directly respond to the client by passign the service proxy. When DSR is enabled Kube-router
220
+
will uses LVS's tunneling mode to achieve this.
220
221
221
-
To enable DSR you need to annotate service with `kube-router.io/service.dsr=tunnel` annotation.
222
+
To enable DSR you need to annotate service with `kube-router.io/service.dsr=tunnel` annotation. For e.g.
222
223
223
-
In the current implementation althouh annotation is enabled, DSR will be applicable only to the external IP's.
224
+
```
225
+
kubectl annotate service my-service "kube-router.io/service.dsr=tunnel"
226
+
```
227
+
228
+
**In the current implementation when annotation is applied on the service, DSR will be applicable only to the external IP's.**
229
+
230
+
**Also when DSR is used, current implementation does not support port remapping. So you need to use same port and target port for the service**
224
231
225
232
You will need to enable `hostIPC: true` and `hostPID: true` in kube-router daemonset manifest.
226
233
Also host path `/var/run/docker.sock` must be made a volumemount to kube-router.
227
234
228
235
Above changes are required for kube-router to enter pod namespeace and create ipip tunnel in the pod and to
229
236
assign the external IP to the VIP.
230
237
231
-
For an e.g manifest please look at [manifest](../daemonset/kubeadm-kuberouter-all-features-dsr.yaml) with DSR requirments enabled.
238
+
For an e.g manifest please look at [manifest](../daemonset/kubeadm-kuberouter-all-features-dsr.yaml) with DSR requirements enabled.
239
+
240
+
### Load balancing Scheduling Algorithms
241
+
242
+
Kube-router uses LVS for service proxy. LVS support rich set of [scheduling alogirthms](http://kb.linuxvirtualserver.org/wiki/IPVS#Job_Scheduling_Algorithms). You can annotate
243
+
the service to choose one of the scheduling alogirthms. When a service is not annotated `round-robin` scheduler is selected by default
244
+
245
+
```
246
+
For least connection scheduling use:
247
+
kubectl annotate service my-service "kube-router.io/service.scheduler=lc"
248
+
249
+
For round-robin scheduling use:
250
+
kubectl annotate service my-service "kube-router.io/service.scheduler=rr"
251
+
252
+
For source hashing scheduling use:
253
+
kubectl annotate service my-service "kube-router.io/service.scheduler=sh"
254
+
255
+
For destination hashing scheduling use:
256
+
kubectl annotate service my-service "kube-router.io/service.scheduler=dh"
0 commit comments