Posts

Showing posts with the label low latency

Guide to Initializing and Connecting AWS DynamoDB

Image
Introduction Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability at any scale. Key benefits include: unlimited scalability, extremely low latency in milliseconds, built-in security, and flexible pricing models based on usage (On-demand) to optimize costs. Detail Use AWS CDK to create the lib/dynamodb-stack.ts file import * as cdk from "aws-cdk-lib" import * as dynamodb from "aws-cdk-lib/awsf-dynamodb" import { Construct } from "constructs" export class DynamodbStack extends cdk . Stack { constructor ( scope : Construct , id : string , props ?: cdk . StackProps ) { super (scope, id, props) const productTable = new dynamodb. Table ( this , "ProductTable" , { tableName: "Products" , partitionKey: { name: "id" , type: dynamodb.AttributeType. STRING , }, billingMode: dynamodb.Bi...

Guide to using Redis with NestJS

Image
Introduction Redis is an in-memory data structure store, used as a database, cache, and message broker. Redis provides very fast access speeds due to storing data in RAM, helping optimize performance for applications requiring low latency and high concurrent query handling capability. Valkey is an open-source project created to continue the development of Redis after Redis changed its license towards a commercial one. Valkey is fully compatible with existing Redis protocols and libraries, bringing advantages in stability, being completely free (BSD-licensed), and supported by a large community and leading technology corporations. Detail First, create a docker-compose.yml file with the following content services : valkey : image : valkey/valkey:8.0-alpine container_name : valkey ports : - "6379:6379" command : valkey-server --save 60 1 --loglevel warning The above code uses Docker Compose to initialize a container running Valkey, exposing port 6379 for ...