Writing an API at the Edge with Workers and Cloud Firestore

Writing an API at the Edge with Workers and Cloud Firestore

While we gear up for general availability, we wanted to provide users an opportunity to reserve their favorite subdomain in a fair and consistent way, so we built a system to allow visitors to reserve a subdomain where their Workers will live once Workers.dev is released. Of course, we always want to use the best tool for the job, so designing the Workers that would back Workers.dev started with an inventory of constraints and user experience expectations:

At a high, procedural level, our little system needed to handle the following roadmap:

I was tasked with handling the back end operations. While Cloud Firestore is excellent for handling requests from many users, in this case we want to restrict access to just our worker instances, and for that we need to create a Service Account.

Source: blog.cloudflare.com