Skip to main content

Posts

Showing posts from April, 2023

Design a serverless web scrapper

Greetings In a previous article , I explained how we synced the WordPress website into our microservices architecture. We use AWS EKS for our deployments and managing microservices. But what if we use a serverless architecture? Here is my attempt at the serverless solution on my serverless journey. Note that this is about converting your own website into a serverless architecture. Always check ethicality in use. Note: This is about the architecture, not about actual coding. Requirement Convert existing website into a serverless microservice. Technologies By sticking into Nodejs and AWS I would go with the below stack. AWS Lambda AWS S3 AWS Eventbridge AWS RDS AWS API gateway AWS Cognito AWS CloudFront AWS Amplify AWS SES Nodejs JavaScript Axios Cheerio React I would consider AWS Step functions in the future as one lambda is doing too many things (save in database, store images in S3, send emails). However, my AWS Step functions knowledge is not as great as today. Architecture Let's...

Redis Cache with Nodejs, AWS

Greetings Modern applications are highly data-driven, and distributed and performance is a top priority. Redis has become one of those critical components in most applications. In this article, we will briefly look into Redis and how we can use it in a NodeJS application. "Power real-time applications with sub-millisecond latency" Redis Fast, open source in-memory, a key-value data store for use as a database, cache, message broker, and queue (from the doc). It stands for Remote Dictionary Server. We usually think of Redis as a cache because it is the most used use case. But Redis is more than a cache. As an example, Redis is an ideal option to store user sessions in web applications. Here are a few use cases but for more details better to read the documentation. Caching Session store Messaging Queue Gaming leader boards Geospatial Caching is a must in Microservices architecture to improve performance. We utilize Redis for this purpose in our e-commerce ap...