[Pulp-dev] Integer IDs in Pulp 3

David Davis daviddavis at redhat.com
Wed May 23 18:26:05 UTC 2018


Before the release of Pulp 3.0 GA, I think it’s worth just checking in to
make sure we want to use UUIDs over integer based IDs. Changing from UUIDs
to ints would be a very easy change at this point  (1-2 lines of code) but
after GA ships, it would be hard if not impossible to switch.

I think there are a number of reasons why we might want to consider integer
IDs:

- Better performance all around for inserts[0], searches, indexing, etc
- Less storage required (4 bytes for int vs 16 byes for UUIDs)
- Hrefs would be shorter (e.g. /pulp/api/v3/repositories/1/)
- In line with other apps like Katello

There are some downsides to consider though:

- Integer ids expose info like how many records there are
- Can’t support sharding or multiple dbs (are we ever going to need this?)

[0] http://kccoder.com/mysql/uuid-vs-int-insert-performance/

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20180523/e2b5309d/attachment.htm>


More information about the Pulp-dev mailing list