Re: Pointer to the CF code that generates org and service instance guids?


Jean-Sebastien Delfino
 

Thanks that helps. I have a few follow up questions:

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
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,

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

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.