1
13 Comments

Database caching solutions in the cloud?

Hey fellow hackers,

My team was thinking about providing a managed tool to cache queries from databases in CDNs. This would greatly reduce the latency from request to response, one use case would be for mobile applications. What do you guys think? Is this a pain to any of you?

posted to Icon for group Ideas and Validation
Ideas and Validation
on April 21, 2020
  1. 1

    How would you compare this to simply using something like REDIS to cache the data? It's a proven product that has been around for a while. Just curious :)

    1. 1

      I'd say it's fairly easier because it would be a single API call. You wouldn't have to set up and maintain Redis hosting (or using hosted Redis).
      Another differentiation would be the cached query results being as close to the application as possible (because this request will always be cached at the CDN, greatly reducing the distance the request has to travel).

      Does it make sense to you?

      1. 1

        Yes that makes sense. Can you discuss the cache invalidation strategies you'll be employing or allow the end user to have control over? What sort of latency are we talking about here? Would the end user be allowed to use their own CDN such as AWS Cloudfront or would you be using your own?

        1. 1

          Ah, good to hear that made sense!
          About caching invalidation, that would happen if, for some reason, the cached result is not as updated as your setup (let's say refresh every 10s). You would also be able to manually bypass the cache, and also set up everything that should be cached (meaning all other hits will go straight to the data sources).
          Latency-wise, we are still developing it and anything I say right now would be a wild guess, but I believe something between 20-100ms is achievable (time to reach a CDN server and come back).
          As of now, only CDN available would be Cloudflare, but maybe that could evolve in the future.

          I hope I clarified things, and if you wouldn't mind, I'll reach you in the future to discuss further details - maybe even provide you a beta testing key when we start testing it outside, what do you think?

          1. 1

            Sure. I'd be interested in knowing more technical details about it then as well as latency info and any SLAs you may provide. For a B2B app, that's going to be more important for me. It's one thing to have a product but it's a whole another ball game having a product that scales, is reliable and provide certain latency guarantees, redundancy, etc..For any serious SAAS products, that's going to be important. I'm always open to trying new things that I can add to my toolkit though :)

            1. 1

              Sweet! I'll let you know as we advance on this project

  2. 1

    Hey, did you end up making this?

    1. 2

      Yes, we are building it. We predict to launch for the first users in about a month. Our backend is practically read, the heavy workload now is to build the frontend and website. I'll let you know of our progress if you want!

      1. 1

        It's a great idea, I would very much be interested in following your progress and trying it out when ur ready :D

  3. 1

    How would this be different than Cloudflare Workers or CloudFront@Edge?

    1. 1

      The tool would also be able to access your database and make the query, so all of this would be completely transparent to the user. Not all users are able / willing to set up Cloudflae Workers themselves.
      Does it make sense to you or is this idea just worthless anyway?
      Thanks for the interest btw

  4. 1

    Yes! But as a Wordpress user, there are many options (plug-ins). How do you plan on differentiating yourself from others?

    1. 1

      In my research I couldn't find anything to do this, could you please list some?
      I think I wasn't clear enough in my post, but the cache would be the results from a database query, not the cache that websites use to deliver their usual content. Does any of the mentioned plugins actually query databases?
      Thanks a lot for your time and input

Trending on Indie Hackers
AI runs 70% of my distribution. The exact stack. User Avatar 187 comments I'm a solo founder. It took me 9 months and at least 3 stack rewrites to ship my SaaS. User Avatar 150 comments I used $30,983 of AI tokens last month in Claude code on $200/mo plan User Avatar 72 comments my reddit post got 600K+ views. here's exactly what i did User Avatar 39 comments I turned someone’s tweet into an app idea and it has made ~$3000 so far in 4 months. User Avatar 35 comments We could see our AI bill, but not explain it — so I built AiKey User Avatar 27 comments