DEV Community

Cover image for Tech Stack for Thumbrella Cloud
Peter Shinners
Peter Shinners

Posted on

Tech Stack for Thumbrella Cloud

There's a mountain of cloud services out there, and this one is mine. This post looks at the individual services I landed on, including my thoughts and pricing strategies.

Thumbrella is an online server for thumbnailing media. It's fast and efficient. The server is open source and intended to be self hosted. There is also a Cloud service that provides gargantuan free usage. This article looks at the tech stack behind the scenes for the online Cloud service.

Cloudflare Workers - Edge hosting

The primary entry point for the service is handled through Cloudflare Workers. I've been super happy with this choice for the project core. I'm taking advantage of KV Storage, D1 Database, Analytics Engine, rate limiting, and edge-local caching.

This basic level of the service is compiled from Thumbrella's "tier1" as a WASM worker. This runs natively and fast as a Cloudflare worker.

Cloudflare is a fairly common choice for many workers with similar requirements. So nothing surprising here, other than I'm super impressed with the service. Currently this is using the $5/month worker plan because I was experimenting using Cloudflare containers earlier. At this point that's not part of the service, which may cause me to scale back to the free Workers tier.

Clerk - Account management

For all user management I've been really happy with Clerk. This handled all registration and user account management. I've integrated Clerk's user admin dashboard directly into the main Thumbrella main website, and I worked hard to make all parts of the website feel integrated.

Clerk will be free to use up until 50,000 active accounts. If that kind of stratospheric growth happens I'll likely request one of their incubation plans for startups. Clerk manages all the subscriptions, credits, and details I'm happy to punt on to a service that gets the specifics correct.

This also allows me to minimize my PII (personally identifiable information). The only thing Thumbrella stores are Clerk user identifiers. I don't have any emails user information to deal with or protect.

I'm also hoping Clerk's account linking and bot protection will at least minimize potential for abuse. Nothing I expect to be perfect. But also I'm expecting to be thousands of times better than me rolling my own.

One thing that surprised me was switching from Clerk's "development" mode to "production". They are managed as entirely separate systems. Once I was ready to switch to production I found a bit more work than I prepared for. But this also allowed some cool and deeper integrations; like routing all authentication through a subdomain (clerk.thumbrella.dev).

Modal - Compute

I ended up using Modal for the actual media processing. What a pleasant surprise discovering Modal. The Thumbrella processing code (tier2 and tier3) have been super comfortable inside these containers. For my use cases I only need CPU processing, which almost flies underneath their GPU focused pricing tiers. Generally they run processing through Docker containers, and provide a magic programmatic interface for configuring and deploying them.

These run quicker than I had been seeing on Cloudflare Containers and a couple random, cheap VPS services I experimented with.

Modal accounts get a free $30 of processing per month, which Thumbrella fits comfortably inside of (for now). As Thumbrella usage grows I'll likely need to apply for their Starter credit grants. I'm also prepared to offload some free processing to slower economic services, like Cloudflare Containers.

Checkly - Service monitoring

Checkly is a lightweight service uptime monitor. While they offer a wide range of alerts and AI analysis, I am only interested in small uptime tracking charts. The free service does plenty for my needs. I have the assortment of domains and services mentioned in this document all monitored by Checkly. I haven't hooked up any alerts or notifications, but do get a weekly summary email.

Of all the services I've used, Checkly is the most "aggressive" at marketing and signing ups. Fortunately it was all quite easy to unsubscribe and settle down.

Github - Private container images

Github hosts the open source server and client libraries. Github actions are used to build and deploy many of the various packages. There is also a private Github repository holding all the Cloudflare integrations.

I also rely on Github to host private OCI Docker images which deploy to Modal. After everything else Github is used for this feels like a trivial side note.

Conclusion

Connecting all these pieces has been surprisingly interesting. One of the primary goals was getting the Cloud service running free for as much as possible. The right services are out there if you search. Seeing what other services are doing right (and doing wrong) inspired the motivations for my own project.

You can read more about the Cloud service directly on Thumbrella's documentation and the pricing page gives a comparison with other services (hint, orders of magnitude cheaper).

I can go into more detail on any of these parts. I'm also interested in comparable services I missed. Get in touch!

Top comments (0)