Scaling with Breaking News: BBC's Serverless Infrastructure on Google Cloud - Build What's Next
Case Study

Scaling with Breaking News: BBC’s Serverless Infrastructure on Google Cloud

1270

Of your peers have already read this article.

3:30 Minutes

The most insightful time you'll spend today!

Learn how BBC's Digital Distribution team leverages Google Cloud's serverless infrastructure to enhance their news delivery platform, handle unpredictable traffic spikes, and improve overall efficiency. Read case study now!

Editors note: Today’s post is from Neil Craig at the British Broadcasting Corporation (BBC), the national broadcaster of the United Kingdom. Neil is part of the BBC’s Digital Distribution team which is responsible for building the services such as the public-facing www bbc.co.uk and .com websites and ensuring they are able to scale and operate reliably. 


The BBC’s public-facing websites inform, educate, and entertain over 498 million adults per week across the world. Because breaking news is so unpredictable, we need a core content delivery platform that can easily scale in response to surges in traffic, which can be quite unpredictable.  

To this end, we recently rebuilt our log-processing infrastructure on a Google Cloud serverless platform. We’ve found that the new system, based on Cloud StorageEventarc, Cloud Run and BigQuery, enables us to provide a reliable and stable service without us having to worry about scaling up during busy times. We’re also able to save license fee payers money by operating the service more cost effectively than our previous architecture. Not having to manually manage the scale of major components of the stack has freed up our time, allowing us to spend it on using, rather than creating the data.

A log in time

To operate the site and ensure our services run smoothly we continually monitor Traffic Manager and CDN access logs. Our websites generate more than 3B log lines per day, and handle large data bursts during major news events; on a busy day our system supports over 26B log lines in a single day. 

As initially designed, we stored log data in a Cloud Storage bucket. But every time we needed to access that data, we had to download terabytes of logs down to a virtual machine (VM) with a large amount of attached storage, and use the ‘grep’ tool to search and analyze them. From beginning to end, this took us several hours. On heavy news days, the time lag made it difficult for the engineering team to do their jobs.

We needed a more efficient way to make this log data available, so we designed and deployed a new system that deals with logs and reacts to spikes more efficiently as they arrive, improving the timeliness of critical information significantly.

In this new system, we still leverage Cloud Storage buckets, but on arrival, each log generates an event using EventArc. That event triggers Cloud Run to validate, transform and enrich various pieces of information about the log file such as filename, prefix, and type, then processes it and outputs the processed data as a stream into BigQuery. This event-driven design allows us to process files quickly and frequently — processing a single log file typically takes less than a second. Most of the files that we feed into the system are small, fewer than 100 Megabytes, but for larger files, we automatically split those into multiple files and Cloud Run automatically creates additional parallel instances very quickly, helping the system scale almost instantly.

The nature of running a global website which provides news coverage means we see frequent, unpredictable large spikes of traffic. We learn from these and optimize our systems where necessary so we’re confident in the system’s ability to handle significant traffic. For example, around the time of the announcement of the Queen’s passing in September, we saw some huge traffic spikes. During the largest, within one minute, we went from running 150 – 200 container instances to over 1000…. and the infrastructure just worked. Because we engineered the log processing system to rely on the elasticity of a serverless architecture, we knew from the get-go that it would be able to handle this type of scaling.

Around the time of the announcement of the Queen’s passing in September, we saw some huge traffic spikes. During the largest, within one minute, we went from running 150 – 200 container instances to over 1000…. and the infrastructure just worked

Tweet this quote

Our initial concern about choosing serverless was cost. It turns out that using Cloud Run is significantly more cost-effective than running the number of VMs we would need for a system that could survive reasonable traffic spikes with a similar level of confidence.

Switching to Cloud Run also allows us to use our time more efficiently, as we no longer need to spend time managing and monitoring VM scaling or resource usage. We picked Cloud Run intentionally because we wanted a system that could scale well without manual intervention. As the digital distribution team, our job is not to do ops work on the underlying components of this system — we leave that to the specialist ops teams at Google.

Another conscious choice we made whilst rebuilding the system was to use the built-in service-to-service authentication in Google Cloud. Rather than implementing and maintaining the authentication mechanism ourselves, we add some simple configuration which instructs the client side to create and send a OIDC token for a service account we define and the server side to authenticate and authorize the client. Another example is pushing events into Cloud Run, where we can configure Cloud Run authorization to only accept events from specific EventArc triggers, so it is fully private.

Going forward, the new system has allowed us to make better use of our data safely. For example, BigQuery’s per-column permissions allow us to open up access to our logs to other engineering teams around the organization, without having to worry about sharing PII that’s restricted to approved users.

The goal of our team is to empower all teams within the BBC to get the content they want on the web when they want it, make it reliable, secure, and make sure it can scale. Google Cloud serverless products helped us to achieve these goals with relatively little effort and require significantly less management than previous generations of technology.

4398

Of your peers have already watched this video.

32:00 Minutes

The most insightful time you'll spend today!

Webinar

On-Demand Webinar: How APIs Help Walgreens Merge Physical and Digital Retail

APIs are how modern businesses rapidly expand into new contexts—making it possible for companies like Walgreens to transform from brick-and-mortar businesses into omnichannel organizations that serve customers in innovative ways.

Headquartered in Deerfield, Illinois, Walgreens is the second-largest pharmacy store chain in the United States. It specializes in filling prescriptions, health and wellness products, health information, and photo services. The company has more than 8,000 stores and operates in 50 states, the District of Columbia, Puerto Rico, and the US Virgin Islands.

Walgreens has built a thriving API program that lets software developers plug into its retail and pharmacy business. As a result, the company now fills one prescription per second via mobile devices.

More than 100 photography apps offer Walgreens photo printing and same-day pickup at 8,000+ locations. Perhaps best of all, Walgreens has found that users who use its mobile app spend more than those who don’t.

Watch Erin Neus-Cheong from Walgreens and Alicia Paterson from Google Cloud explore why treating APIs as products—not projects—can help companies tap into the value of APIs as business accelerators and open up new channels of opportunity.

5046

Of your peers have already watched this video.

2:50 Minutes

The most insightful time you'll spend today!

Case Study

FedEx Ground Makes Talent Recruitment More Effective with AI

FedEx Ground is a package shipping company and is a subsidiary of FedEx. It wanted to make hiring easier, and more intuitive so that it could hire the best people.

“We need to have every advantage we can to recruit and retain talent. That’s what led us to the work with Google and its capabilities,” says Matt Tokorcheck, VP, Operations, Support and Engineering, FedEx Ground

The challenge was the narrow slotting of job roles. The openings were listed under specific headings which revolved around job types or departments–and if applicants didn’t fit or understand those categories, they didn’t apply.

Take, for example, applicants that came from the military. “Many of my fellow service members and veterans expressed difficulty in finding a job post the military because a lot of the skill sets that they’ve developed and honed over their military career aren’t as useful in the civilian world,” says David Henderson, Industrial Engineer, FedEx.

So FedEx Ground decided to work with Google Cloud’s AI-powered talent solution.

“As a job seeker when you come to our career site to search for jobs, that search is powered by Jibe and the Google Jobs API. And it really matches the keywords that a job seeker inputs with the jobs that are available at FedEx Ground, says Shailesh Bokil, MD, Talent Acquisition and Planning, Fedx Ground.

This makes job hunting a very intuitive experience for applicants.

“When I type into the search bar, I was immediately prompted to input my MOS, which is your military occupational specialty. And what it (the system) does is it takes the skills that are developed while serving in that MOS0 and matches them with skill sets that employers are looking. When I input 12A (an MOS), immediately I was getting results back for various engineer positions.

To find out more about how FedEx Ground employs AI-powered talent solution, watch the video.

E-book

APIs: The New Marketing Platform

DOWNLOAD E-BOOK

3703

Of your peers have already downloaded this article

5:23 Minutes

The most insightful time you'll spend today!

APIs power all digital marketing channels and the apps we use today. APIs are a window on your company’s digital assets, exposing them so developers and partners can build mobile apps and become part of your innovation engine.

Thanks to the open API economy, you can build mobile apps that use a mix of APIs; you can combine location APIs with targeted promotions, or map your morning run with a calorie counter. Wrapping an API around your digital assets gets you into the game and builds value that wins customer loyalty and revenue. Marketing is about highlighting value, and promoting that value to customers.

This eBook highlights how APIs are evolving as the business technology that brings the CIO and CMO together. They bridge the gap between what the CMO needs to create value for customers and what the CIO needs to deliver a platform for a digital business. With alignment in place and technology that’s purpose-built for the requirements of the digital world, the potential to grow and succeed is limitless.

Blog

BigQuery Helps Insurance Firms Leverage Previous Storm Data for Better Pricing Insights

8561

Of your peers have already read this article.

2:00 Minutes

The most insightful time you'll spend today!

With Google Cloud Public Datasets, insurers can use over 100 high-demand public datasets on past storms events in different states, cities, counties, and storm types to track common risks that help unveil insights to drive outcome-based pricing.

It may be surprising to know that U.S. natural catastrophe economic losses totaled $119 billion in 2020, and 75% (or $89.4B) of those economic losses were caused by severe storms and cyclones. In the insurance industry, data is everything. Insurers use data to influence underwriting, rating, pricing, forms, marketing, and even claims handling. When fueled by good data, risk assessments become more accurate and produce better business results. To make this possible, the industry is increasingly turning to predictive analytics, which uses data, statistical algorithms, and machine learning (ML) techniques to predict future outcomes based on historical data. Insurance firms also integrate external data sources with their own existing data to generate more insight into claimants and damages. Google Cloud Public Datasets offers more than 100 high-demand public datasets through BigQuery that helps insurers in these sorts of data “mashups.” 

One particular dataset that insurers find very useful is Severe Storm Event Details from the U.S. National Oceanic and Atmospheric Administration (NOAA). As part of the Google Cloud Public Datasets program and NOAA’s Public Data Program, this severe storm data contains various types of storm reports by state, county, and event type—from 1950 to the present—with regular updates. Similar NOAA datasets within the Google Cloud Public Datasets program include the Significant Earthquake DatabaseGlobal Hurricane Tracks, and the Global Historical Tsunami Database.  

In this post, we’ll explore how to apply storm event data for insurance pricing purposes using a few common data science tools—Python Notebook and BigQuery—to drive better insights for insurers.

Predicting outcomes with severe storm datasets

For property insurers, common determinants of insurance pricing include home condition, assessor and neighborhood data, and cost-to-replace. But macro forces such as natural disasters—like regional hurricanes, flash floods, and thunderstorms—can also significantly contribute to the risk profile of the insured. Insurance companies can leverage severe weather data for dynamic pricing of premiums by analyzing the severity of those events in terms of past damage done to property and crops, for example. 

It’s important to set the premium correctly, however, considering the risks involved. Insurance companies now run sophisticated statistical models, taking into account various factors—many of which can change over time. After all, without accurate data, poor predictions can lead to business losses, particularly at scale.  

The Severe Storm Event Details database includes information about a storm event’s location, azimuth (an angle measurement used in celestial coordination), distance, impact, and severity, including the cost of damages to property and crops. It documents:

  • The occurrence of storms and other significant weather events of sufficient intensity to cause loss of life, injuries, significant property damage, and/or disruption to commerce.
  • Rare, unusual weather events that generate media attention, such as snow flurries in South Florida or the San Diego coastal area.
  • Other significant weather events, such as record maximum or minimum temperatures or precipitation that occur in connection with another event.

Data about a specific event is added to the dataset within 120 days to allow time for damage assessments and other analysis.

Damage caused by the storms.jpg
Damage caused by the storms in the past five years by state

Driving business insights with BigQuery and notebooks

Google Cloud’s BigQuery provides easy access to this data in multiple ways. For example, you can query directly within BigQuery and perform analysis using SQL. 

Another popular option in the data science and analyst community is to access BigQuery from within the Notebook environment to intersperse Python code and SQL text, and then perform ad hoc experimentation. This uses the powerful BigQuery compute to query and process huge amounts of data without having to perform the complex transformations within the memory in Pandas, for example.

In this Python notebook, we have shown how the severe storm data can be used to generate risk profiles of various zip codes based on the severity of those events as measured by the damage incurred. The severe storm dataset is queried to retrieve a smaller dataset into the notebook, which is then explored and visualized using Python. Here’s a look at the risk profiles of the zip codes:

Clusters of Zip codes.jpg
Clusters of Zip codes by number of storms and damage cost.

Another Google Cloud resource for insurers is BigQuery ML, which allows them to create and execute machine learning models on their data using standard SQL queries. In this notebook, with a K-Means Clustering algorithm, we have used BigQuery ML to generate different clusters of zip codes in the top five states impacted by severe storms. These clusters show different levels of impact by the storms, indicating different risk groups. 

The example notebook is a reference guide to enable analysts to easily incorporate and leverage public datasets to augment their analysis and streamline the journey to business insights. Instead of having to figure out how to access and use this data yourself, the public datasets, coupled with BigQuery and other solutions, provide a well-lit path to insights, leaving you more time to focus on your own business solutions.

Making an impact with big data

Google Cloud’s Public Datasets is just one resource within the broader Google Cloud ecosystem that provides data science teams within the financial services with flexible tools to gather deeper insights for growth. The severe storm dataset is a part of our environmental, social, and governance (ESG) efforts to organize information about our planet and make it actionable through technology, helping people make a positive impact together. 

To learn more about this public dataset collaboration between Google Cloud and NOAA, attend the Dynamic Pricing in Insurance: Leveraging Datasets To Predict Risk and Price session at the Google Cloud Financial Services Summit on May 27. You can also check out our recent blog and explore more about BigQuery and BigQuery ML.

E-book

Two-Speed IT with APIs : Move Fast and Maintain Control

DOWNLOAD E-BOOK

4188

Of your peers have already downloaded this article

10:47 Minutes

The most insightful time you'll spend today!

The rapid growth in mobile, big data, and cloud technologies has profoundly changed market dynamics in every industry, driving the convergence of the digital and physical worlds, and changing customer behaviour. It’s an evolution that IT organizations struggle to keep up with. To succeed, a new approach is required; one that enables agile and web-scale innovation so that IT can meet evolving business requirements while enabling existing systems to continue running reliably, efficiently, and securely.

There’s a way to enable the stability of enterprises’ operational systems of record while also fostering the speed and agility necessary to create powerful new applications and services that serve customers, partners, and employees in a digital economy that’s moving at blinding speed.

Whether you think about this as bimodal IT, two-speed IT, or traditional IT/agile IT, this new approach recognizes the value of both the back-end operational systems and the fast-changing world of user engagement. Read this eBook to explore how two-speed IT can usher a new approach that recognizes the value of both the back-end operational systems and the fast-changing world of user engagement.

More Relevant Stories for Your Company

How-to

Transforming Media Industry: Three Strategies for Media Leaders to Leverage Generative AI

The digital era turned the traditional formula for media and entertainment success on its head, ushering in new technologies that have changed how content is produced, distributed, experienced, and monetized. Audiences have more choice, flexibility, and power over what they consume, and today’s media companies have to embrace ongoing transformation

Blog

Enhancing Developer Productivity with Skaffold v2 GA

For years, Google has been committed to maximizing developer productivity. In 2019, we announced the general availability of Skaffold, a command-line tool that facilitates continuous development and delivery for containerized applications. Today, we're excited to announce that Skaffold V2 is now generally available. Skaffold V2 expands Skaffold’s supported platforms and

Case Study

Le Figaro Uses Google Firebase to Personalize Experiences and Generates 3X Revenue Results

Le Figaro, established in 1826, is France's oldest and largest daily morning newspaper. The company’s mission is to provide timely, digestible and engaging news to their readers. As one of the first in the industry to offer digital content, Le Figaro engages their subscribers across 11 Android, iOS and web

Blog

Release of Go 1.18 is A New Milestone for Development of Secure Apps

On March 15th, the Go team announced Go 1.18 GA, the latest release of the Go programming language. The culmination of over a decade of design delivers the features our developers demanded: generics, fuzzing, and module workspaces. With this release, Go becomes the first major language to integrate fuzz testing

SHOW MORE STORIES