2022.02
Reducing Database Load for the "Tokyo Afterschool Summoners" App by LifeWonders
AWSBackendPerformance Tuning

Project Overview
Technical support to strengthen and harden the backend of "Tokyo Afterschool Summoners," a hugely popular LGBT-oriented mobile game with 60,000 followers on X that is still going strong more than 10 years after release.
Heavy traffic was overloading the servers, increasing the number of running servers and costs along with it. In this project, we combined three services, Amazon S3, Amazon Athena, and AWS Glue, to reduce the database connection load per access.
Log files are transferred using td-agent (fluentd).
Challenges
Beyond transferring logs to AWS, we needed to normalize the transferred logs and build report and log list pages that retrieve them from the backend admin panel.
Our Approach
To achieve this, we reproduced the app development environment locally and covered every server access point by monitoring network logs while playing the game on a simulator. We then rewrote the PHP code at each server access point to output logs in a format designed for td-agent.
We also modularized the log output into functions so it can be controlled centrally.
