🍹 Technologies: TypeScript, Node.JS, Express, React, Redux, Next.js, MongoDB, Mongoose, Event Driven, Pub-Sub, Docker, Kubernetes, CI/CD, Skaffold, Apache Kafka, NATS Streaming Server etc.
Aditya Hajare (Linkedin).
WIP (Work In Progress)!
Open-sourced software licensed under the MIT license.
+ Why Database Per-Service- We want each service to run independently of other services.
- Database schema/structure might change unexpectedly.
- Some services might function efficiently with different types of DB's (SQL vs. NoSQL).
+ Communication Strategies Between Services- Sync: Services communicate with each other using direct requests.
- Conceptually easy to understand.
- Service won't need a database.
- Introduces a dependency between services.
- If any inter-service request failes, the entire service fails.
- The entire request is only as fast as the slowest request.
- Can easily introduce webs of requests.
- Async (Event Based Communication): Services communicate with each other using events.
- No inter-service dependency.
- Service will be extremely fast since it has it's own data store.
- Introduces data duplication. Paying for extra storage + extra DB.
- Harder to understand.
+ Event Bus- Many different implementations. For e.g.
RabbitMQ,Kafka,NATSetc.. - Receives events, publishes them to listeners.
- Many different subtle features that make async communication way easier or way harder.
+ Kubernetes Basic Terminologies- Cluster: A collection of
nodes+ amasterto manage them. - Node: A
virtual machinethat runs ourcontainers. - Pod: More or less a running container. Technically, a
podcan run multiple containers. - Deployment: Monitors a
set of pods. Make sure they are running and restarts them if they crash. - Service: Provides an
easy-to-remember URLto access a runningcontainer.
+ Kubernetes Config Files- Tells Kubernetes about the different Deployments, Pods and Services (Referred to as
Objects) that we want to create. - Written in
YAMLsyntax. - Always store these files with our project source code - they are documentation!
- We can create
Objectswithout config files - DO NOT DO THIS!. Config files provide a precise definition of what our cluster is running.
+ Securely Create Secrets In Kubernetes- Following command will create a secret called
JWT_KEY:
kubectl create secret generic jwt-secret --from-literal=JWT_KEY=adityahajare