Home / Companies / Upstash / Blog / April 2021

April 2021 Summaries

3 posts from Upstash

Filter
Month: Year:
Post Summaries Back to Blog
The Roadmap Voting Application, developed to demonstrate the feasibility of serverless applications with Redis, faced challenges such as spam entries and the inability to manage feature requests without an admin dashboard. To address these issues, authentication was integrated using the Auth0 module, allowing users to sign in to submit feature requests and designating admins to manage and release features. The updated application now provides a more secure and manageable environment, allowing for the easy deployment of the app with customizable Redis and Auth0 configurations. For those seeking a simpler version, an earlier iteration without Auth0 is available in the examples repository.
Apr 16, 2021 223 words in the original blog post.
The article presents a comparative analysis of the latencies of three serverless databases—DynamoDB, FaunaDB, and Upstash (Redis)—using a sample news website where each database stores 7,001 New York Times articles scored randomly. The study records database-related latency for fetching the top 10 articles from each database using AWS Lambda functions, with the latency measured between the Lambda function and the database, excluding browser-server latency. It reveals that Upstash exhibits the lowest latency (~50ms at the 99th percentile), while FaunaDB shows the highest (~900ms), attributed to its strong consistency and global replication; DynamoDB stands at ~200ms. Additionally, the cold start effect in serverless environments, notably impacting FaunaDB and Redis, influences latency, with optimizations like reusing client connections mitigating some delays. Future enhancements for Upstash include a Premium product with multi-zone replication, and ongoing discussions on forums like HackerNews have prompted modifications to the FaunaDB setup for more accurate benchmarking.
Apr 12, 2021 2,637 words in the original blog post.
Designing a database for serverless applications presents challenges, particularly with managing database connections due to the scalability demands of serverless functions. Upstash addresses these issues by implementing a connection eviction algorithm, which monitors and terminates idle connections to prevent exceeding database connection limits, while also offering tools like the @upstash/redis for efficient connection handling. Redis connections are generally lightweight, but latency can become significant in environments with limited CPU power or memory, such as default AWS Lambda configurations. The solution involves balancing the trade-offs between reusing connections to minimize latency and closing connections to avoid idle connection issues. Upstash also offers a GraphQL API as a connectionless alternative, although it introduces a slight latency overhead. The company continues to refine its approach, including adjusting connection timeouts to better synchronize with AWS Lambda's handling of idle functions, highlighting the complexity and ongoing nature of optimizing databases for serverless architectures.
Apr 01, 2021 1,673 words in the original blog post.