Best of ServerlessJuly 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·2y

    Serverless vs. Traditional Hosting

    Compare serverless hosting and traditional hosting for web applications by evaluating their costs, benefits, and drawbacks. Serverless hosting, with its auto-scaling and pay-per-use model, is ideal for applications with unpredictable traffic. In contrast, traditional hosting offers fixed pricing and full control, making it suitable for consistently high traffic applications. Examples of providers include AWS Lambda for serverless and DigitalOcean for traditional hosting.

  2. 2
    Article
    Avatar of towardsdevTowards Dev·2y

    Building a Serverless Data Pipeline: A Step-by-Step Guide

    The guide provides step-by-step instructions to build a serverless data pipeline using AWS services. Key components include AWS Lambda for data extraction from the Colombo Stock Market Index API, Amazon Kinesis Data Firehose for data ingestion, Amazon S3 for storage, and AWS Glue for ETL orchestration with Athena for querying data. The pipeline uses event-driven architectures with SQS notifications and Glue crawlers for efficient data processing.

  3. 3
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    Full Stack Development with Next.js, Clerk, and Neon Postgres

    This tutorial provides a comprehensive guide on building full-stack applications using Next.js, Clerk, and Neon, a serverless PostgreSQL database. It covers setting up Neon, integrating it with Next.js, managing the database with Drizzle ORM, implementing user authentication with Clerk, and performing CRUD operations. The tutorial also highlights Neon's unique features like serverless architecture, auto-scaling, and instant branching.

  4. 4
    Article
    Avatar of hnHacker News·2y

    The Great Database Migration

    Shepherd successfully migrated its pricing engine database from SQLite to Postgres with zero downtime. The new architecture improves scalability, performance, and developer experience. The migration included converting synchronous functions to asynchronous, leveraging a serverless architecture with Neon, and automating ETL processes. The project highlighted performance optimizations, including caching strategies and connection pooling, resulting in significantly improved response times.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    Real-Time Notifications using pg_notify with Neon Postgres

    Learn how to implement real-time notifications in PostgreSQL using pg_notify and Neon. This guide covers provisioning a Neon-powered PostgreSQL database, creating a Node.js application, setting up event triggers, listening for notifications, and sending notifications using triggers. Follow the detailed steps to build a webhook-like system that instantly notifies users on specific database operations.

  6. 6
    Article
    Avatar of implementingImplementing·2y

    Deploy AWS Lambda functions with Serverless Framework and Node.js

    Learn how to deploy AWS Lambda functions with the Serverless Framework and Node.js. The guide covers setting up a serverless project, configuring the serverless.yml file, deploying the Lambda function, and setting up the AWS API Gateway for HTTP invocation. Includes steps for creating a project, initializing an NPM project, and configuring CloudFormation stacks for deployment.

  7. 7
    Article
    Avatar of communityCommunity Picks·2y

    HTTP vs. WebSockets: Which protocol for your Postgres queries at the Edge

    SQL-over-HTTP has been added to the Neon driver, which previously only supported WebSockets, for querying Postgres databases closer to end-users. WebSockets excel in maintaining consistent connections, offering low latencies for sustained queries but perform slower for single-shot queries. By contrast, HTTP is quicker for single-shot queries but lacks features like session support and interactive transactions. To strike a balance, connection caching was introduced, speeding up HTTP queries by around 10ms. The choice between HTTP and WebSockets depends on query type, user location, and specific APIs used.

  8. 8
    Article
    Avatar of awegoAwesome Go·2y

    Building Ollama Cloud - Scaling Local Inference to the Cloud

    The post discusses scaling Ollama, a wrapper around llama.cpp for local inference tasks, from local development to a cloud environment. It explores transitioning from simple local setups to complex distributed cloud systems, emphasizing the role of serverless computing and WebAssembly in managing dependencies and scaling. The Tau framework and its Orbit plugin system simplify deployment and enable seamless integration of Ollama functions as cloud-ready endpoints. The post provides examples and steps to set up and test with Tau, culminating in the deployment of AI applications in production environments.

  9. 9
    Article
    Avatar of communityCommunity Picks·2y

    When LIMIT 9 works but LIMIT 10 hangs

    A debugging story details an issue with a PostgreSQL query that hangs when using LIMIT 10 but works with LIMIT 9. The problem is linked to WebSocket payload lengths and an underlying bug in the undici package's handling of WebSocket frames in Node.js. The story highlights the nuances of WebSocket framing, the importance of precise buffer management, and how a small code fix resolved the problem.

  10. 10
    Article
    Avatar of communityCommunity Picks·2y

    The problem with Postgres replicas

    Neon reimagines Postgres read replicas with a serverless architecture that decouples compute and storage, making replicas lightweight, affordable, and fast to provision. Traditional read replicas duplicate the entire database, leading to inefficiencies and additional costs. Neon's approach eliminates data redundancy, allows for instant provisioning, and enables autoscaling and scaling to zero, effectively balancing performance and cost-efficiency.

  11. 11
    Article
    Avatar of communityCommunity Picks·2y

    An easy intro to edge computing

    Edge computing enhances website performance by processing data closer to the user, reducing latency and improving user experience. It involves using networks of servers (CDNs) to cache and serve content more efficiently. Modern edge networks can run code close to users, enabling personalized content, A/B testing, and better error handling. Technologies like Fastly and Glitch aim to make these advanced capabilities accessible to more developers, paving the way for innovative web applications.

  12. 12
    Article
    Avatar of cerbosCerbos·2y

    Recap of webinar: "Simplify access controls in Node.js, React & serverless apps"

    The webinar covers the use of Cerbos Hub for simplifying access controls in Node.js, React, and serverless applications. Key insights include differentiating between authentication and authorization, handling roles and permissions efficiently, and deploying policy changes without altering other code. The session demonstrates setting up a free policy repository on Cerbos Hub, synchronizing policies across different applications, and leveraging WebAssembly libraries for consistent access control. Additionally, the webinar explores the advantages of decoupling authorization logic from application code for scalable and secure deployments.

  13. 13
    Article
    Avatar of communityCommunity Picks·2y

    Point In Time Recovery Under the Hood in Serverless Postgres

    Neon offers Point-In-Time Restore (PITR) for serverless Postgres, enabling developers to recover data from any previous state using Time Travel queries. This is achieved through a storage system that separates storage and compute, utilizing Write-Ahead Logging (WAL). Neon’s architecture includes Safekeepers for data persistence, Pageservers for multi-tenant storage, and AWS S3 for durable storage. This setup eliminates the need for traditional backups and standbys, making Postgres a stateless compute instance that can quickly spin up in under 500ms. Neon’s implementation simplifies PITR, making it efficient, reliable, and user-friendly through ephemeral branches and Time Travel Assist.