by dantiberian · 1y ago · 0 comments
This seems like a good pattern, but of lower value for a SaaS app with many customers storing private data in your service. This is because the cache hit-rate for any particular company's data would be low. Is this an accurate assessment, or did I misunderstand something?
It’s worth noting that Electric is still efficient on read even if you miss the CDN cache. The shape log is a sequential read off disk.
Say Jira used electric, would you be able to put all tickets for a project behind a cdn cache key? You'd need a cdn that is able to run auth logic such as verifying a jwt to ensure you don't leak data to unauthorized users, right?
See the auth guide: https://electric-sql.com/docs/guides/auth
Some CDNs also validate JWTs, so the CDN can be the proxy part of the Gatekeeper pattern (in the guide).
Electric itself is quite scalable at reads too so for a SaaS use-case, you might not need any http proxy help.