Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Add memcached to frontend machines #5517

Closed
wants to merge 1 commit into from
Closed

Conversation

tijmenb
Copy link
Contributor

@tijmenb tijmenb commented Feb 22, 2017

This adds memcached to the frontend machines. I've copied the config from the other machines with memcached (whitehall, mapit, backend nodes).

We'll use this mainly to cache HTTP responses, first from slimmer (alphagov/slimmer#184) and hopefully later from gds-api-adapters.

cc @boffbowsh

https://trello.com/c/D9HmkJwI

This adds memcached to the frontend machines. I've copied the config
from the other machines with memcached (whitehall, mapit, backend
nodes).

We'll use this mainly to cache HTTP responses, first from slimmer and
hopefully later from gds-api-adapters.
@boffbowsh
Copy link
Contributor

How did you arrive at 12%? It looks about right based on frontend machines in production right now (and the hope that this will reduce memory bloat anyway) but it'd be good to have the number documented

@tijmenb
Copy link
Contributor Author

tijmenb commented Feb 22, 2017

As noted, the config was copied from the existing configs. All the nodes are set at 12%. I'll try to find out why.

@tijmenb
Copy link
Contributor Author

tijmenb commented Feb 22, 2017

The history of the 12%:

@boffbowsh
Copy link
Contributor

#wearethe12percent. Fine by me but probably needs a review from an infrastructure person first

@tijmenb
Copy link
Contributor Author

tijmenb commented Feb 22, 2017

After some googling, I found that the docs in the puppet module that was originally used (saz/memcached) uses 12% as an example: https://github.com/saz/puppet-memcached#use-12-of-available-memory. Perhaps the source?

@stephenharker
Copy link
Contributor

Can this caching be done with Redis instead of memcached?

@boffbowsh
Copy link
Contributor

Technically yes, but Redis would have to be configured to do LRU based eviction, which it isn't by default. This would also mean we couldn't use the same Redis instances as we currently use, as they can't be configured for LRU eviction.

@tijmenb
Copy link
Contributor Author

tijmenb commented Feb 22, 2017

Had a quick chat with @stephenharker about this. One important consideration is if we can still run applications on Heroku/PaaS without a configured memcached.

I'm closing this so it can thought about some more. It doesn't block alphagov/slimmer#183, because apps could be configured to use ActiveSupport::Cache::Store and it would still be an improvement.

@tijmenb tijmenb closed this Feb 22, 2017
@tijmenb tijmenb deleted the add-memcached-to-frontend branch February 27, 2017 10:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants