When we looked for relevant issues in the current software engineering landscape, specifically with AWS Lambda, our team reached out to different software engineers at Amazon to try and identify potential problems. Their response was unanimous: cold starts. Cold starts are a side effect of having a serverless architecture platform like Lambda, and they happen when a function is not invoked for a certain period of time. After that time period, the function becomes “cold” and requires a significantly longer time frame to run again (generally from 100ms to 1 second). This happens because the Amazon servers stop keeping the code ready in order to maintain efficiency. This can lead to issues for developers in testing and production. Tests will often fail because of cold start latency delays and if they happen in production the user will have much more lag than usual in using a product, which could end up costing a business money if they decide to leave a website, for example.
So what was our solution to assist developers in combating cold starts? Hearth. Hearth is a desktop application that helps developers using AWS Lambda prevent and monitor cold starts through timed invocation and data visualization specifically tailored to assist in combating cold starts. Hearth allows developers to set custom timers for individual Lambda functions, anywhere between one and sixty minutes, and visualizes important information from recent invocations of each function such as duration (including cold start time if applicable), billed duration, and maximum memory usage. Developers are also given a parsed and formatted list of recent CloudWatch logs for a selected Lambda function which allows them to monitor key metrics as they pertain to cold starts in order to make informed decisions on when they should invoke their functions to avoid them. With all of these capabilities, we’re confident that Hearth is a tool that will help developers in the fight against cold starts.
Please follow the steps to get started:
-
Download Hearth here.
MacOS:
- Double click to unzip and open the 'hearth-darwin-x64-1.0.0.zip' file.
- Right click to open Hearth. Do not double click the application. If the open button does not appear, close it and try to open it again. It should then appear as pictured below.
- Click 'open' on the pop up window to launch Hearth.
-
For existing users: login with your existing username and password.
-
For new users: click "Sign up" to create a new account.
-
Create a Hearth stack with AWS Cloud Formation.
-
Copy and Paste the unique Hearth Delegation Role ARN generated from step 4.
-
Login with the newly created credentials.
Once the application is running, click on the "My Lambda Function" dropdown to view your Lambda functions. Select the function you would like to keep warm, and select how often (in minutes) to warm the function by dragging the slider or manually inputting a number.
Select a function to view its logs and visualize its metrics in the sidebar on the left. This will display graphs and a log table of up to ten of the most recent invocations.
Here at Hearth we are always open to ways to improve our application. If you would like to contribute to the open source community, follow the steps below to submit your ideas and/or bug fixes to the team:
- Fork this repository to your GitHub account.
- Clone the repository.
git clone https://github.com/oslabs-beta/hearth.git
cd hearth
- Create a feature branch.
git checkout -b <your-name/new-feature>
- Add your changes.
git add .
- Commit your changes.
git commit -m “your commit comment here”
- Push your feature branch to your remote repo.
git push origin [your-name/new-feature]
- Submit a pull request, and a member of our team will review and merge the changes as soon as possible!
- Linda Ngo - LinkedIn | GitHub
- Andy Oh - LinkedIn | GitHub
- Christina Phung - LinkedIn | GitHub
- Jay Cheskis - LinkedIn | GitHub
Hearth is distributed under the MIT License.