Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The changes proposed here do not affect public interfaces or otherwise interfere with backward compatibility

Two additional (optional) parameters would be added to the Kafka broker configuration.

...

The solution proposed calls for an additional class in the network package and an additional check in the acceptor thread, as mentioned above. Translation of the CIDR ranges into upper and lower boundaries happens on server startup so the overhead of checking this in the acceptor thread should be O(N) where N is the number of distinct ranges specified in the configuration. The actual comparison is done by converting the connection IP address into a BigInteger representation and comparing it with the upper and lower boundaries of each CIDR range. First match exits the lookup. The solution also supports IPv6 addresses (hence the need for BigInt vs Int).

...