Summary
JG Arcade is a prototype internal app created by Jahnel Group to promote culture within our company. It allows employees to challenge each other to various company activities, i.e. Pool, Pac-Man, Ping Pong, etc. Each employee’s rating for a specific activity is calculated and displayed through a leaderboard system. The application’s infrastructure was designed in AWS to accommodate our continually growing company, aiming to make the application scalable in a cost effective way.
Designed for Scalability and Cost Savings
Since JG Arcade is an internal application, both scalability and cost savings are two important must haves. Given that the application will have spiky and inconsistent workloads, JG Arcade takes advantage of both AWS Lambda and DynamoDB. The backend is serverless and runs on AWS Lambda. This allows the app to sit dormant during the work day when employees are working, then scale up and down on-demand after hours when matches are being reported. The database chosen to further provide scalability is DynamoDB. If implemented correctly, it provides fast and reliable reads regardless of database size, and also has on-demand pricing. Similar to Lambda, this allows us to only pay for what we use, providing further cost savings.
To further improve JG Arcade’s cost effectiveness and scalability, JG arcade’s React frontend is stored in AWS Simple Storage Service (S3). S3 is a secure and scalable storage service that uses a key-value model to store objects (typically files). The static frontend of JG Arcade is stored within an s3 bucket that is configured to host a static site, which is significantly cheaper than running a web server to host a site. Updating the site is as simple as updating the content of the bucket.
Piecing It All Together
When hosting a static site through S3 you can cache request responses through a Content Delivery Network (CDN) to significantly speed up how fast users can access content on your site or API. AWS Cloudfront, is the CDN the JG Arcade infrastructure uses to control how an end user will access both the frontend S3 bucket and the backend Lambda functions. When a user makes a request to JG Arcade to access our API or S3, the request is sent to Cloudfront first. Cloudfront processes the request and directs the user’s traffic to the correct location (S3 or to the correct Lambda function). The responses returned to the user from cloudfront are cached, so as identical requests are made, cloudfront remembers what was returned back in the previous requests, so rather than sending the user all the way back to S3 to get the same file, it can grab the file directly from the cache. It is very simple to configure Cloudfront to work with Lambda functions, and S3, so using it here for increased response times is a no-brainer.
Conclusion
JG arcade is able to simultaneously remain scalable while significantly saving costs, by utilizing the on-demand nature of AWS services like Lambda and DynamoDB.
Author Bio
Dom Favata is an associate developer at Jahnel Group, Inc., a custom software development firm based in Schenectady, NY. Jahnel Group is a consulting firm that specializes in helping companies leverage technology to improve their business operations. We provide end-to-end strategic consulting and deployment services, helping companies optimize their operations and reduce costs through the use of technology. Jahnel Group is an Advanced Tier AWS Services Partner, with expertise in AWS Lambdas, Amazon API Gateway, Amazon DynamoDB, and other AWS services.