How to cache ghost posts?

I ran a benchmark using `ab -r -n 1000 -c 10 https://
just by running this several mysql processes came up and whole website was slowed down.

Config: Digital ocean

I think there needs to be a caching layer(from my side) on top of ghost which can do full page cache and avoid database hits.
Can someone provide me some info on this?

Varnish is great for caching content. You can configure varnish to never cache API / Admin requests, but listen to those requests since they have cache invalidation headers

Do you have any hardware recommendations for using Varnish? Do you cache in memory or on disk?

As far as I’m aware, Varnish supports both in-memory and disk storage for caches. You don’t need powerful hardware to run Varnish; a $5 DO droplet with Ghost and Varnish should be adequate.

Yes it does, I was curious what your implementation choices were.

a $5 DO droplet with Ghost and Varnish should be adequate.

That’s good to know, as that’s the droplet I’m using right now and I wanted to cache in memory but was concerned that this tier of droplet wouldn’t have enough memory.

You can always use swap if needed. I configured Varnish on my site (which isn’t very active) a couple years ago, and I manually purge caches when I update posts since that doesn’t happen often.

As an aside, all of this discussion is relative to size; if you have thousands of posts, a $5 droplet probably won’t suffice.

Yeah I guess I’ll just have to give it a try and watch memory consumption. I’ll have to look into how to use swap on a DO droplet.

I used caddy server on top of Ghost. It’s cache mechanism did increased my website req/s. I did full page cache but I can’t flush cache or avodi homepage cache.

Can I do that in varnish without getting into terminal?
And do you prefer ghost + nginx + varnish or just ghost + varnish?

Not that I’m aware. Varnish uses a compiled configuration mechanism and I think you need terminal access to make changes. Questions like these are better suited for your host.

My configuration is ghost->varnish->nginx but as far as I’m aware, varnish is capable of serving as a web server