Kubernetes – Deploy NestJS lên K8s cơ bản
Kubernetes (K8s) orchestrates containers — tự động scale, restart khi crash, rolling deploy không downtime. Bài này hướng dẫn deploy NestJS lên K8s từ Dockerfile đến production-ready deployment.
1. Kiến trúc cơ bản
Internet → LoadBalancer → Ingress → Service → Pods
├── Pod 1 (NestJS)
...
AWS Cognito – Authentication as a Service cho NodeJS
AWS Cognito cung cấp authentication/authorization hoàn chỉnh như một dịch vụ — đăng ký, đăng nhập, MFA, OAuth2, quản lý user pool — không cần implement từ đầu. Phù hợp khi đã dùng AWS ecosystem.
1. Cognito vs tự implement
Tính năng
Cognito
Tự implement
User pool
✅ Built-in
Cần code
...
WebRTC – Video Call cơ bản với NodeJS & Socket.io
WebRTC cho phép trình duyệt giao tiếp peer-to-peer trực tiếp — video call, voice call, file sharing mà không qua server. NodeJS chỉ cần làm signaling server để hai peer tìm thấy nhau.
1. WebRTC hoạt động như thế nào?
Peer A Signaling Server (NestJS) Peer B
│ │ ...
Anthropic Claude API – Xây dựng AI App với NodeJS
Claude là LLM của Anthropic — nổi tiếng về khả năng phân tích, viết code, và an toàn. Bài này hướng dẫn tích hợp Claude API vào NestJS, từ text generation đến tool use và streaming.
1. Cài đặt
npm install @anthropic-ai/sdk
2. Basic Chat
// src/ai/claude.service.ts
import { Injectable, Logger } from '@nestjs/common';
import Anthropic from '@...
Redis Streams – Event Sourcing nhẹ với NodeJS
Redis Streams là cấu trúc dữ liệu log append-only trong Redis — nhẹ hơn Kafka, tích hợp sẵn nếu đã dùng Redis. Phù hợp cho event sourcing quy mô vừa, activity logs, real-time feeds.
1. Redis Streams vs Pub/Sub vs Kafka
Redis Pub/Sub: Fire & forget — không lưu message
Redis Streams: Persistent log — consumer group, pending messages
Kafk...
69 post articles, 12 pages.