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

Compress ACME certificates in KV stores. #2814

Merged
merged 6 commits into from Feb 9, 2018

Conversation

nmengin
Copy link
Contributor

@nmengin nmengin commented Feb 6, 2018

What does this PR do?

Today, ACME certificates are Base64 encoded by Træfik before to be stored into a KV store entry.
The Base64 encoding is fat and size in KV store entries can be limited (like in Consul) : it's not possible to store more than 20-30 certificates in Consul.

This PR replaces the Base64 encoding by a gzip compression.

Motivation

Fixes #1325

More

  • Added/updated documentation

Additional Notes

Thanks to data compression, Træfik can store up to 100 ACME certificates in Consul.

Copy link
Member

@emilevauge emilevauge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nmengin !
Few comments on the doc :)

@@ -165,9 +165,26 @@ storage = "acme.json"
# ...
```

File or key used for certificates storage.
`storage` allows providing to Træfik an item where storing all the ACME certificates.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say instead: sets where are stored your ACME certificates

- a JSON file,
- a KV store entry.

!!! note
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may use !!! danger "DEPRECATED" instead as in the rest of the documentation for deprecated features.

@@ -186,13 +202,26 @@ docker run -v "/my/host/acme:/etc/traefik/acme" traefik
```

!!! note
`storage` replaces `storageFile` which is deprecated.
This file cannot be shared per many instances of Træfik at the same time.
If you have to use Træfik cluster mode, please use [a KV store entry](/configuration/acme/#storage-kv-entry).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I would use !!! danger here, instead of !!! note

```

**This kind of storage is mandatory in cluster mode.**
Thanks to the Træfik cluster mode algorithm (based on [the Raft Consensus Algorithm](https://raft.github.io/)), only one instance will contact Let's encrypt to resolve the challenges.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/resolve/solve

Because KV stores (like Consul) have limited entries size, the certificates list is compressed before to be set in a KV store entry.

!!! note
It's possible to store up to 120 ACME certificates in Consul.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to store up to approximately

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@emilevauge emilevauge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nmengin nmengin deleted the feature/compress-acme-cert-kv branch August 3, 2018 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants