openshift / openshift/origin

Unexpected behavior after configuring HAProxy Template Router Settings

Open
#18,395 5 comments 0 reactions 1 assignee View on GitHub

@knobunc is already working on this.

Since Feb 1, 2018.

kind/bug lifecycle/frozen priority/P1 sig/network-edge
Dominant language
Go
Stars
8.7k
Forks
4.8k
Avg merge
4d 10h
Merged PRs (30d)
53

Description

There's possible to open any quantity of multiple parallel socket connections from one IP on route's host and port 80 over configured 'rate-limit-connections.concurrent-tcp' and 'rate-limit-connections.rate-tcp' parameters.

Openshift version 3.6

Steps To Reproduce
  1. Create route and configure it with the following annotations:
    haproxy.router.openshift.io/rate-limit-connections: 'true'
    haproxy.router.openshift.io/rate-limit-connections.concurrent-tcp: '1'
    haproxy.router.openshift.io/rate-limit-connections.rate-tcp: '1'
    haproxy.router.openshift.io/rate-limit-connections.rate-http: '10'
  2. Try to open multiple concurrent tcp socket connections (2 or more).
  3. Ensure that configured rate-tcp and concurrent-tcp limits are are not exceeded:
    sudo lsof -i -P | grep -i "established"
Current Result

java 38615 user 29u IPv6 0x327a86683dfe73db 0t0 TCP 192.168.206.50:55799->myhost:80 (ESTABLISHED)
java 38615 user 30u IPv6 0x327a86683dfe851b 0t0 TCP 192.168.206.50:55796->myhost:80 (ESTABLISHED)
java 38615 user 31u IPv6 0x327a86683dfe685b 0t0 TCP 192.168.206.50:55798->myhost:80 (ESTABLISHED)
java 38615 user 32u IPv6 0x327a86683dfe909b 0t0 TCP 192.168.206.50:55797->myhost:80 (ESTABLISHED)

Expected Result

Concurrent connections to route are equal to '1' (concurrent-tcp=1)
Opened connections to route are equal to '1' (rate-tcp=1)

Additional Information

See full route config and utility for opening multiple concurrent connections.

CrunchifyIsSocketAliveUtility.java.zip
myroute.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.