Date
1 - 4 of 4
Pointer to the CF code that generates org and service instance guids?
Jean-Sebastien Delfino
Hi all,
Could somebody from the CF team point me to the CF code that generates org and service instance guids? Are the generated guids globally unique across multiple deployments/instances of CF? or only unique within a single instance of CF? Thanks! - Jean-Sebastien |
|
CF Runtime
Org and Service Instance guids are generated by the Cloud Controller. It
simply uses the SecureRandom.uuid ruby method: http://docs.ruby-lang.org/en/2.2.0/SecureRandom.html#method-c-uuid SecureRandom.uuid implements RFC 4122 and generates guids randomly. The guids for orgs are guaranteed to be unique for a single deployment, and mathematically incredibly likely to be unique across all deployments. Joseph CF Release Integration Team On Fri, Oct 9, 2015 at 2:51 PM, Jean-Sebastien Delfino <jsdelfino(a)gmail.com> wrote: Hi all, |
|
Jean-Sebastien Delfino
Thanks that helps. I have a few follow up questions:
toggle quoted message
Show quoted text
Can you quantify 'mathematically incredibly likely'? How do you guarantee uniqueness for a single deployment (since AIUI they're generated randomly)? Are you using the CC database for that? What would it take to guarantee uniqueness across deployments? (I'm asking as cloud platforms out there usually run in several datacenters or regions, i.e. multiple deployments, so to me it would make sense to provide a way to implement that guarantee, for example by allowing the uuid to be generated from a namespace/name like described in RFC 4122 section 4.3 [1], but there's probably many other ways to do this...) [1] https://www.ietf.org/rfc/rfc4122.txt Thanks! - Jean-Sebastien On Fri, Oct 9, 2015 at 11:08 PM, CF Runtime <cfruntime(a)gmail.com> wrote:
Org and Service Instance guids are generated by the Cloud Controller. It |
|
Eric Malm <emalm@...>
Hi, Jean-Sebastien,
V4 UUIDs contain 122 bits of information ( https://tools.ietf.org/html/rfc4122#page-14), so there are approximately 5.3 × 10^36 distinct ones. Since the Ruby implementation that Joseph referred to generates them randomly, we can assume them to be distributed uniformly across the sample space. From the approximation formulas in https://en.wikipedia.org/wiki/Birthday_problem#Cast_as_a_collision_problem, for there to be even a one-in-a-billion probability of a collision, you would have to be using more than 10^14 UUIDs simultaneously as organization guids. If you have, say, only a million org guids in play, the probability of a collision decreases to about 10^-25. Thanks, Eric On Tue, Oct 20, 2015 at 10:28 PM, Jean-Sebastien Delfino < jsdelfino(a)gmail.com> wrote: Thanks that helps. I have a few follow up questions: |
|