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

Add cache to Ghost blog service #8

Open
BretFisher opened this issue Aug 31, 2018 · 6 comments
Open

Add cache to Ghost blog service #8

BretFisher opened this issue Aug 31, 2018 · 6 comments
Labels
enhancement New feature or request

Comments

@BretFisher
Copy link
Owner

Since the Ghost service can only have a single replica (Ghost design limitation), it's expected to have a caching proxy in front of it, which itself could be multi-replica for better LB/HA. I'm thinking the best options here are varnish or nginx, which would be another service in the Ghost stack file.

@BretFisher BretFisher added the enhancement New feature or request label Aug 31, 2018
@pascalandy
Copy link
Contributor

I'll be very curious to see the architecture you have in mind. There is an issue on Traefik's GitHub but it goes nowhere at this point.

@BretFisher
Copy link
Owner Author

I was assuming a cache container in front of Ghost node container. So traffic would be:

client --> cloud LB-->swarm ingress-->traefik-->proxy overlay-->cache-->ghost overlay-->ghost

I'm normally a nginx guy, and have done reverse proxy caching with it before, but thought it would be fun to try varnish in this project, which I haven't used.

Hopefully, we can use one of these images:

  • This one requires a varnish config file added as a swarm config, but looks flexible and up to date.

  • This one is ENVVAR heavy, which I like (very 12factor.net!) No configs needed hopefully.

@pascalandy
Copy link
Contributor

pascalandy commented Nov 15, 2018

If I understand well, in a case where I have 5 Ghost instances, I would need 5 varnish instances.

client—>cloud LB—>swarm ingress—>traefik—>proxy overlay—>Varnish_Caching_1—>Ghost overlay—>Ghost_1
                                                       —>Varnish_Caching_2—>Ghost overlay—>Ghost_2
                                                       —>Varnish_Caching_n—>Ghost overlay—>Ghost_n

I actually like this. Not all my clients needs to have a caching instance :-p

@BretFisher
Copy link
Owner Author

Yes, it would be a 1-to-1. The other option would be to replace layer 7 reverse proxy (Traefik) with something that can do both DNS routing and caching... like nginx... but I feel like that's harder to get right.

@pascalandy
Copy link
Contributor

Thanks for your input on this :)
BTW, I'll will not replace Traefik anytime soon :-p

@pascalandy
Copy link
Contributor

pascalandy commented Nov 21, 2018

I'm not very knowledgeable with Caddy, but it sounds like an elegant solution

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

No branches or pull requests

2 participants