Friday 30 June 2023

Modeling a scalable fantasy football database with Amazon DynamoDB

Today’s online games generate more data than ever and have request rates that reach millions per second. For these data-intensive games, it’s important for developers to select a database that delivers consistent low latency at any scale and has throughput elasticity to accommodate spikes in traffic without costly overprovisioning during low activity periods. This is why Amazon DynamoDB is a popular database service for games. DynamoDB is a serverless, key-value NoSQL database that delivers consistent low latency results and high availability, with a low level of administrative overhead whether your game generates one request per month or one million requests per second. Some of the key reasons game developers use DynamoDB are:

  • Scalability: DynamoDB offers nearly unlimited throughput and storage with flexible pricing models that scale with your workload.
  • Fully managed: DynamoDB handles most administrative tasks such as patching and backups so that you can focus on developing your game. DynamoDB being serverless means you don’t have to provision or manage instances or storage. It automatically scales capacity to meet workload demand, provides pay-per-use pricing, and all you need to get started is to create a table.
  • Global tables: DynamoDB global tables provide a fully managed, multi-Region, and active-active database that enables fast, local read and write performance for massively scaled, global applications.
  • Amazon Web Services (AWS) integrations: DynamoDB integrates with other services like Amazon Kinesis Data Streams for streaming item changes, AWS CloudTrail for logging, AWS Lambda for invoking actions, and other services as needed. To learn more, see the DynamoDB features page.

The following architecture diagram depicts a production-ready game running on AWS and backed by DynamoDB. In this post we focus on DynamoDB table design concepts within the context of the popular fantasy football game type.

 

 

Figure 1: Sample architecture for a production-ready game backend on AWS

 

In this AWS Database Blog Post, we discuss access patterns for a fictitious fantasy football game, and then demonstrate the DynamoDB table schema we designed to satisfy those patterns. We focus on a fantasy football (soccer) league game where friends compete to create the best team rosters using real-world football players and results in a ranked competition. DynamoDB is the backend database of the application used by gamers to manage their teams and track their scores as the football season develops over time. We discuss design considerations for modeling a DynamoDB table to support access patterns for functionalities like team selection, points scoring, and leaderboard support for the game.

 

https://aws.amazon.com/blogs/database/modeling-a-scalable-fantasy-football-database-with-amazon-dynamodb/

 

No comments:

Post a Comment