Sanity: Transforming digital content delivery with an advanced platform built on Google Cloud
About Sanity
Sanity is a fast, flexible platform for delivering structured content to digital devices and products. It is a software as a service that makes it easier for developers to integrate content by treating it as structured data. Its open source editing environment, Sanity Studio, lets developers support content teams with a fully customizable UI and a real-time hosted data store.
Tell us your challenge. We're here to help.
Contact usTo support content creators and developers building editorial workflows, Sanity built a fast, flexible platform on Google Cloud which structures content as data to optimize its distribution.
Google Cloud results
- Enables developers to debug code without disrupting customers, through managed services that smoothly migrate virtual machines for maintenance
- Supports fast distribution of content globally with a reliable CDN and edge-cached infrastructure near all major ISPs
- Enables just two site-reliability engineers to handle all global operations and ensure availability using Google Cloud Load Balancing
Easily handles 5x traffic with Google Kubernetes Engine
It’s no wonder that 59% of the global population are active internet users: the online world has become the richest repository of information, always available at the click of a button (or swipe of a screen). And yet, most internet users are likely unaware of the amount of work involved in creating and bringing content to their screens. Enter Sanity, a content infrastructure platform launched in 2017 to help content creators and the developers behind their editorial workflows to create, optimize, and distribute content online.
Traditionally, digital content was locked to its presentation and had little or no interoperability with other services. Today, with workflows becoming increasingly web oriented and communication being multichannel, this lack of flexibility poses a problem that Sanity is helping to solve. “We believe that digital content, such as text and images, should not be static and stuck to one page. They should be portable, easy to repurpose over time, and easy to distribute across multiple channels,” says Simen Svale Skogsrud, co-founder and CTO at Sanity. “And we’ve figured out that this is possible if we treat content as structured data,” he says of Sanity’s strategic approach to helping developers make content integration easier.
Sanity’s clients span from individuals with personal blogs to large retailers and restaurant chains. Using Sanity, they power their websites, marketing campaigns, intranet systems, and mobile applications with content built and stored in their own Sanity editing environment, which is fully customizable to support the specific needs of their content teams. Sanity helps developers to integrate content more easily across platforms using APIs, thus eliminating the need for content creators to copy-paste or author it multiple times according to the varying requisites of different platforms. It also lets users integrate back-office systems that augment and keep certain content, such as product specifications, reliable and correct. Because it is Sanity’s real-time aspect that enables it to deliver this important value-add, a reliable and scalable infrastructure is crucial.
“Sanity needed a hosted, scalable platform and a global presence to be able to deliver up-to-date content to end users wherever they are, quickly. We did a lot of research to determine what partner could best help us gain these capabilities, and decided on Google Cloud.”
—Simen Svale Skogsrud, co-founder and CTO, SanityThis vision of enabling efficiency and collaborative experiences between developers and content makers is one of the things that takes Sanity beyond the content management system (CMS) category. But to support its global customers in real time, Sanity knew that its platform had to be highly available and scalable to support their varying needs. So, looking for a platform upon which to build its solution with these needs in mind, Sanity turned to Google Cloud.
Powering the latest content with Google Kubernetes Engine
“Sanity needed a hosted, scalable platform and a global presence to be able to deliver up-to-date content to end users wherever they are, quickly. We did a lot of research to determine what partner could best help us gain these capabilities and decided on Google Cloud,” says Simen of the decision, to which he adds that Google Kubernetes Engine (GKE), in particular, stood out during the search.
To highlight the importance of GKE for Sanity’s services, Simen offers an example: “One of our customers is a large restaurant chain whose menu information and related online content, such as product sales and marketing campaigns, are all hosted on Sanity. When they run a marketing campaign, their traffic multiplies. Thanks to GKE, our system is able to deal with these sudden influxes of traffic. GKE scales up during those times so that we don’t need to set up virtual machines ourselves every time,” he explains, adding that, apart from some basic stateful infrastructure such as databases, GKE runs all the services that make up Sanity. This includes processing user requests and background jobs, automatically scaling to fit the demand at any given time.
“In the two years we’ve been using Google Kubernetes Engine, it has saved us plenty of headaches around scalability. It helps us to scale our operations to support our global users while handling issues that would otherwise wake us up at 3 AM.”
—Simen Svale Skogsrud, co-founder and CTO, SanityThis way, Sanity ensures that its customers’ websites and apps are stable, responding to requests appropriately, and displaying the correct information to all users at all times. “If a user clicks on ‘see menu’ on a restaurant’s website, the screen must display that menu immediately, regardless of whether there is one or one thousand users requesting that at once,” he explains. Sanity relies on GKE to manage this communication between content, application, and user, and solve any issues that may come up in the process without any downtime. “Because content is code, there can be bugs that we have to deal with, which GKE helps us do without the users ever noticing,” he explains. “GKE takes virtual machines down so their errors can be fixed and redeploys others so the system remains available for users. This means users can continue to access content while that content is being updated, rather than getting an ‘error’ message on their screen,” he explains.
“In the two years we’ve been using GKE, it has saved us plenty of headaches around scalability,” adds Simen. “It helps us to scale our operations to support our global users while handling issues that would otherwise wake us up at 3 AM.”
Delivering content smoothly to all corners of the globe
Aside from supporting the editorial environments of customers, Sanity ensures that their content reaches viewers and readers wherever in the world they might be, as quickly as possible. To do that, Sanity turned to Cloud CDN to cache content in servers near every major end-user internet service provider globally. “The content distribution network of Google Cloud is the most reliable for our customers all over the world,” Simen explains of the decision. “We build our own APIs to integrate content with multiple platforms and systems, but we rely on the global infrastructure of Google Cloud to make sure that all that can be accessed from all corners of the globe,” he adds.
Meanwhile, Sanity also relies on the edge network of Cloud Load Balancing to further support the speedy delivery of content for users regardless of their location. “A lot of content that is consumed by websites and apps is essentially the same data,” says Simen. “If 200,000 people come to your website at the same time, they all see the same content. So it doesn’t make sense from an operational perspective to fetch that content from the website’s original database, say, in Europe, for every visitor in Australia. The way we do this is by cache, which means saving the latest version of that content closer to where the visitors are, so the website will return results for their search faster and with less load on our back end,“ Simen explains.
Because the managed services of Google Cloud enable the automation of this function, Sanity is able to run operations around the world with only two site reliability engineers. “With the help of Google Cloud-managed services, our team is able to ensure that our platform and services are up and running at all times, everywhere in the world,” he adds.
“Those that have information readily available and in formats that are easy to use can harness content to enable productivity, growth, and understanding. Sanity wants to make it as easy as possible for people and organizations to do that, and Google Cloud is helping us deliver this vision.”
—Simen Svale Skogsrud, co-founder and CTO, SanityHelping organizations and communities harness valuable content
To support the communication between major organizations and their international online communities at full steam, Sanity stores its user data on databases running on Compute Engine, while uploaded assets such as text and high-resolution images are stored and served in Cloud Storage. Events, such as invalidating caches to push new content to a client, are sent and processed through Pub/Sub. BigQuery serves as the data warehouse of Sanity’s business data and is also used for storage and analysis of HTTP access logs, which helps programmers to detect and solve issues within web applications. When faced with the question “what’s next?”, Simen doesn’t hesitate: “We’re interested in the machine learning capabilities of Google Cloud and how it can help us further augment content to be processed in real time and transformed into formats that are compatible with different platforms,” he says.
“Content is a living thing that you need to tend to and isn’t only fit for marketing purposes,” he adds, taking his vision for the future beyond the development of Sanity itself and into the value that organizations around the world can aim to gain from content instead. “Content is also about documenting valuable work practices and other important information that support workers, managers, customers, communities,” he explains. “Those that have information readily available and in formats that are easy to use can harness content to enable productivity, growth, and understanding. Sanity wants to make it as easy as possible for people and organizations to do that, and Google Cloud is helping us deliver this vision,” he concludes.
Tell us your challenge. We're here to help.
Contact usAbout Sanity
Sanity is a fast, flexible platform for delivering structured content to digital devices and products. It is a software as a service that makes it easier for developers to integrate content by treating it as structured data. Its open source editing environment, Sanity Studio, lets developers support content teams with a fully customizable UI and a real-time hosted data store.