RUUVI: Redefining How You Measure Your World
Ruuvi is a Finnish startup that empowers users with affordable measurement tools for their homes and businesses. High-quality sensors measure humidity, air pressure, movement, and temperature and provide feedback via the Ruuvi mobile app or Ruuvi gateway. Ruuvi’s solution is also open source, which allows it to be integrated with a customer’s existing cloud solution, even if it is third-party.
The AWS cloud was already an integral part of Ruuvi’s business, and they decided to partner with Cloudvisor to optimise their AWS infrastructure. The review aimed to improve Ruuvi’s Continuous Integration and Delivery (CI/CD) process, with the ultimate goal of implementing push notifications on their platform.
To start, Cloudvisor reviewed three key elements of Ruuvi’s AWS implementation:
Security is the top priority in any AWS implementation, so it is often the starting point for reviews. While the initial review demonstrated that Ruuvi had done an excellent job of securing its AWS implementation, the Cloudvisor team identified certain areas where further improvements could be made.
The first step was to ensure the physical separation of account levels between the Dev/Sub environments and the production environments. This was achieved by creating new accounts specific to each environment. Doing so helps to prevent unauthorized access to the live development environment and also prevents developers from accidentally pushing new commits to live production without testing.
Additionally, Cloudvisor strengthened VPC security by fixing certain open AWS security groups. Instead, each data-related component, such as RDS or ElastiCache, was given its own separate security group with account-level security features. This helped create a robust pattern of security groups.
As part of the streamlining effort, Cloudvisor and Ruuvi worked together to scope down IAM roles for different Lambda functions, providing enhanced separation with the minimum amount of required permissions.
Finally, a number of configuration rules were set up to catch misconfigurations. AWS GuardDuty was also set up to identify VPC and CloudTrail logs and send alerts to the Ruuvi team if anything was flagged as suspicious, improving incident response times.
Scalability was a critical concern for Ruuvi. To address this, Cloudvisor focused on improving scalability, starting with the data layer. Cloudvisor leveraged Lambda Functions to take advantage of RDS Proxy features, reduce latency at the Lambda level, and minimize the number of database connections needed to be opened, thereby reducing CPU load. Additionally, Cloudvisor limited the number of concurrent executions happening on a Lambda function, reducing the risk of an expensive Lambda bill due to a malfunctioning function.
Further performance gains were achieved by migrating from a traditional x86 architecture to Graviton Lambda functions and databases. This not only improved Ruuvi’s application performance but also resulted in significant cost savings.
Finally, Cloudvisor implemented a load testing capability to simulate a load 20 times higher than what Ruuvi was currently experiencing. This allowed Cloudvisor to determine how well the serverless resources were scaling and enabled them to future-proof Ruuvi’s AWS implementation accordingly.
Continuous Integration and Delivery
The final step was to examine Ruuvi’s Continuous Integration and Delivery (CI/CD) processes. While Ruuvi’s team had already laid a solid foundation, Cloudvisor identified certain areas that could be improved immediately. For instance, Ruuvi initially used many functions that required hundreds of different unit and integration tests. These tests were asynchronous, and executions were waiting for dependencies, resulting in a test time of about 15-20 minutes.
Cloudvisor helped Ruuvi implement a build caching mechanism and a parallel test-running feature. Combined, these helped to reduce build and test time to just 4-5 minutes, a 75% reduction! This enabled Ruuvi engineers to push app improvements more quickly and significantly improved the team’s efficiency, ultimately laying the groundwork for the Push Notification feature.
Implementation of Push Notification Feature
Ruuvi had already implemented a feature allowing users to receive email notifications based on specific criteria. For example, a restaurant might request an alert if the temperature in their food storage area drops below a certain level, so they can intervene and prevent spoilage. This feature was popular, so Ruuvi wanted to streamline the customer experience by implementing it into the Ruuvi Mobile App using Push Notifications.
To accomplish this, Cloudvisor developed a cloud-native solution that sends mobile push notifications to both Android and iOS devices, utilizing SNS and FCM integration. Cloudvisor also implemented rate limiting for certain types of notifications to avoid overwhelming users with messages and ensured that the experience was consistent across both iOS and Android devices.
AWS Services Used
- RDS Proxy
- REST API
- Serverless Framework
- NAT Gateway
- SSM Parameter Store
Discover Why Over 500+ Startups Like Ruuvi Trust Cloudvisor
Companies like Ruuvi turn to Cloudvisor because we think like a startup and can quickly understand your unique challenges and pain points. Our team is structured in the same way as many of our clients, which helps us put ourselves in your shoes.
Whether you want to conduct a WAFR, discuss migrating to AWS, or implement new AWS-powered features, our team is standing by to help. All you need to do is schedule a call today!