Code.org Hosts a Successful Global Event with Support from Amazon Aurora
In a Massachusetts classroom in December 2019, a third grader, described by her teacher as dealing with low self-esteem and with no computer at home, spent a successful hour coding with Code.org. Afterward, that same teacher described her student as “beaming, dancing, and so very proud.” This is a dream outcome for Code.org—and it’s what inspires the organization’s mission.
We had a very successful Hour of Code, and our transition to Amazon Aurora is what made that possible."
Lead Infrastructure Engineer, Code.org
Code.org Delivers Access to Computer Science Education
Every year, Seattle-based nonprofit Code.org hosts a global online event called Hour of Code. During the weeklong event, millions of students and teachers around the world engage with hundreds of computer science tutorials in more than 45 languages from dozens of activity partners. For many students, the Hour of Code is their first encounter with computer science. Thanks in part to Code.org’s use of Amazon Aurora with MySQL compatibility, that first encounter in 2019 was a success.
“Our high-level goal is to ensure that every student in every school has the opportunity to learn computer science,” says Anthony Suarez, Code.org’s chief technology officer. The Hour of Code is an important part of that goal, not only giving teachers a chance to discover the platform and learn how to bring Code.org’s curriculum into their classrooms but also providing rare exposure to students: “This may be their only chance in school for the whole year to do something like this if they don’t have computer science programs available,” says Suarez. That level of teacher and student engagement is why 100 percent uptime is so important for Code.org, both during the Hour of Code and throughout the year. How the platform performs could “affect learning opportunities and the perception of our tools that impact usage and adoption for years to come,” says Suarez. “That’s why we take it so seriously.”
High Write Throughput Presents Challenges for the Hour of Code and Beyond
With millions of activities and hours served from the Code.org platform, the ability to deliver a seamless experience presents multiple challenges. “Just during the normal school year, our learning platform executes roughly 1,000 database write queries per second,” says Will Jordan, Code.org’s lead infrastructure engineer. “Every time a student clicks to run some code that they’ve written, we’re persisting that activity to our relational database, so their teacher can review their work and provide feedback.”
Counting the students participating in the Hour of Code—a total of about 15 percent of students worldwide—that load surges to five times normal usage. During 2018’s Hour of Code, Code.org saw evidence that it was reaching the limits of its primary database. Shortly after the event, Code.org sought help from Amazon Web Services (AWS). Already making robust use of cloud services like Amazon Simple Storage Service (Amazon S3) and Amazon Elastic Compute Cloud (Amazon EC2), the nonprofit was interested to see what other solutions AWS could offer.
Amazon Aurora Improves Database Write Performance
To ensure the success of its 2019 Hour of Code, Code.org migrated its MySQL databases to Amazon Aurora. Amazon Aurora is a relational database service that combines the speed and availability of high-end commercial databases with the simplicity and cost effectiveness of open-source databases. As a fully managed database service, Amazon Aurora automates time-consuming administrative tasks, such as configuration and security patching, that otherwise would have required a higher level of involvement from the Code.org staff. Plus, the MySQL-compatible edition of Amazon Aurora delivers up to 5 times the throughput of standard MySQL running on the same hardware, enabling existing MySQL applications and tools to run without requiring modification. “The migration path to Aurora was direct and well documented,” says Winter Dong, a Code.org software engineer who helped implement the migration. “This helped us complete the critical project on time and with minimal risk.” With the migration to Amazon Aurora complete, Code.org was able to deliver.
The Hour of Code event saw 100 percent uptime with no degradation in student experience, and as a result, 50 percent fewer support tickets were created than in 2018; generally, the majority of complaints refer to site outages, new tutorials, or bugs related to new tutorials, which the continuous uptime either minimized or eliminated. Code.org was able to meet its goal of providing smooth service during high traffic without having to sacrifice features that benefit students and teachers in order to reduce the workload. With the new Amazon Aurora–backed infrastructure, Code.org was able to support engaging write-intensive activities—such as Dance Party, which was created in conjunction with the Amazon Future Engineer program. In fact, Amazon Aurora delivered 10 times better write performance than Code.org’s previous database solution, equipping the nonprofit with a complete architecture that could accommodate its current load and support future growth. “We had a very successful Hour of Code, and our transition to Amazon Aurora is what made that possible,” says Jordan.
Code.org Sees Sustainable Long-Term Benefits in Pursuit of Its Mission
Thanks to its savvy use of AWS products, particularly Amazon Aurora and Elastic Load Balancing, which automatically distributes incoming application traffic across Amazon EC2 instances (where the applications are running), Code.org no longer needs to focus on scaling. Instead, it can concentrate on providing new opportunities for its users during the Hour of Code and year-round. “This move to Amazon Aurora has enabled Code.org to give more runway to our product managers and curriculum writers to build innovative and creative curricula for students,” says Suarez. The 10 times faster write latency Code.org has seen since implementing Amazon Aurora has also allowed the team to provide new features, like datasets and shared libraries, that help students to build more real-world apps in tools like App Lab.
The Amazon Aurora–backed architecture hasn’t just helped enrich Code.org’s curricula; it has also helped extend it to more students around the world, enabling 139,810 events to be registered globally in the past year. “Every time we add another classroom worldwide, another country, another language, we’re bringing new students and teachers into the Code.org community,” says Suarez. “All of this is backed by the same Amazon Aurora database. Not having to manage any of this on our own is a key reason why we use AWS and Amazon Aurora.”
To Code.org, working with AWS services like Amazon Aurora means delivering uninterrupted service and constantly improving the experience for millions of users like that third grader in Massachusetts. Ultimately, this brings the nonprofit closer to its goal of making computer science accessible to all students, regardless of who they are and where they come from.
Code.org is a nonprofit organization that offers computer science curricula and programs for use in schools. Its goal is to give all students in all classrooms the chance to study computer science, with a focus on reaching women and students of color to increase diversity in the field.
Benefits of AWS
- Event saw 100 percent uptime with no degradation in student experience
- Write latency 10x faster during event
- Write latency 10x faster during off-peak
- ELB latency decreased to under .094 ms
- 50% fewer support tickets created
AWS Services Used
Amazon Aurora is a MySQL and PostgreSQL-compatible relational database built for the cloud, that combines the performance and availability of traditional enterprise databases with the simplicity and cost-effectiveness of open source databases.
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.
Elastic Load Balancing
Elastic Load Balancing automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, IP addresses, and Lambda functions. It can handle the varying load of your application traffic in a single Availability Zone or across multiple Availability Zones.
Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.
Companies of all sizes across all industries are transforming their businesses every day using AWS. Contact our experts and start your own AWS Cloud journey today.