Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate human-readable hostnames #2

Closed
wants to merge 1 commit into from

Conversation

nicklewis
Copy link
Contributor

Names like cfcfqcuitlkutjo and phfyyu4t4ahjaae are impossible to communicate
outside of chat, and difficult to talk about. This commit adds a dictionary of
basic english words[1] and generates hostnames by randomly joining three of
them with -. Example hostnames:

clothes-at-sound take-map-uncle shoot-nearly-me sail-eye-certain
trust-little-woman

[1] http://simple.wikipedia.org/wiki/Wikipedia:List_of_1000_basic_words

Names like cfcfqcuitlkutjo and phfyyu4t4ahjaae are impossible to
communicate outside of chat, and difficult to talk about. This commit
adds a dictionary of basic english words[1] and generates hostnames by
randomly joining three of them with -. Example hostnames:

clothes-at-sound
take-map-uncle
shoot-nearly-me
sail-eye-certain
trust-little-woman

[1] http://simple.wikipedia.org/wiki/Wikipedia:List_of_1000_basic_words
@ghost
Copy link

ghost commented Feb 4, 2014

I like the idea, but I think we need to be careful of hostname length limits on some operating systems (e.g. Windows, maybe Solaris).

What about the idea that we pull from a list of X number of short words, then append a GUID to the end of it while ensuring that the total length is <= 15 characters? This would give a little bit of friendliness while still limiting possible name collision.

@sschneid
Copy link
Contributor

sschneid commented Feb 4, 2014

I also considered making this configurable on a per-pool basis so it could be slowly rolled-out...

@stahnma
Copy link

stahnma commented Feb 4, 2014

👍 I like it. If we're already working with hostnames > 8 characters, seems like we should be ok with anything up to a point. Could we just truncate at 24 characters or something?

@heathseals
Copy link
Contributor

👍 i typically avoid hyphens in hostnames, but that seems like a reasonable alternative to deal with length.

@nicklewis
Copy link
Contributor Author

I'll update this to generate only hostnames <= 15 characters.

I'm concerned about the probability of collisions though (even without the 15-character limit). I'm going to explore other ways to limit that and update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants