Claudenw commented on code in PR #385:
URL: https://github.com/apache/incubator-pekko/pull/385#discussion_r1227892220


##########
actor/src/main/resources/reference.conf:
##########
@@ -1144,6 +1144,12 @@ pekko {
         # Defaults to a system dependent lookup (on Unix like OSes, will 
attempt to parse /etc/resolv.conf, on
         # other platforms, will default to 1).
         ndots = default
+
+        # The policy used to generate dns transaction ids. Options are 
sequence, thread-local-random or secure-random.
+        # Defaults to thread-local-random similar to Netty, secure-random 
produces FIPS compliant random numbers but
+        # could block looking for entropy (these are short integers so are 
easy to bruit-force), sequence is the old
+        # behavior.
+        id-generator-policy = thread-local-random

Review Comment:
   If you are generating unsigned shorts (0-65535) for a total of 65536 values 
then then possibility of collision in the generation for the Nth number is:
   
    P(n) = 1- (65535/35536)^(n*(n-1)/2)
   
   So on the 300th selection the probability of collision is 49.5588
   
   Simple random number generation is not going to work here.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to