Load Balancer vs Reverse Proxy

https://www.upguard.com/blog/reverse-proxy-vs-load-balancer Load Balancer and reverse proxy are often same but not always. The similarity between the 2 is in the fact that they handle inbound requests across two or more web servers to spread the load. A reverse proxy, however, typically has any number of features: load balancing: as discussed above caching: it can cache content from the web server(s) behind it and thereby reduce the load on the web server(s) and return some static content back to the requester without having to get the data from the web server(s) ...

September 20, 2024 · 8 min

Networking Important Concepts

IOPS (Input/Output Operations Per Second) is a measure of NUMBER of input/output operations that a system can perform in a second. An I/O operation refers to any read or write operation that accesses data on a storage device, such as a hard disk drive or solid-state drive. IOPS is typically used to measure the random access performance of a storage system, since random I/O operations are typically more demanding than sequential I/O operations. ...

September 19, 2024 · 3 min

Pod Scheduling Workflow in Kubernetes

Pod Scheduling Flow in Kubernetes Open above image in new tab Pod scheduling is a core component of Kubernetes that manages how and where pods are placed across the cluster’s available nodes. The process ensures that each pod meets its requirements, such as resource allocation (CPU, memory), affinity rules, and node availability. Let’s break down the pod scheduling request flow, along with key details based on the provided diagram and Kubernetes principles. ...

September 18, 2024 · 4 min

Nodeaffinity, Taints and Tolerations

Node affinity and taints/tolerations are Kubernetes features that allow you to control where and how pods are scheduled onto nodes in a cluster. They serve different purposes but can be used in combination to achieve more advanced scheduling requirements. Node Affinity: Node affinity is a feature that allows you to specify rules for which nodes your pods are scheduled on based on labels assigned to nodes. It can be used to influence pod placement based on node characteristics such as hardware capabilities, geographic location, or other custom attributes. ...

September 17, 2024 · 5 min

JSON vs BSON

JSON, or JavaScript Object Notation, is a lightweight and easy-to-read format that is widely supported by many programming languages. It is also human-readable and easy to edit, making it a popular choice for storing configuration data, transmitting data over HTTP, and exchanging data between web services. BSON, or Binary JSON, is a binary-encoded serialization format that is designed to be more efficient than JSON when working with large amounts of data. It supports more data types than JSON, including binary data, dates, and regular expressions, and can be up to 20-30% smaller in size than JSON. ...

September 16, 2024 · 2 min

Kubernetes Python Client Usage

Kubernetes has a python client as well, which is very well underrated and should be used for a variety of tasks as follows - Automated Deployment: You want to automatically deploy a new version of your application when code changes are pushed to your Git repository. Use the Python client to create a new Kubernetes deployment, specifying the Docker image version to deploy. Set up a webhook or integration in your CI/CD tool (e.g., Jenkins, GitLab CI/CD, or GitHub Actions) to trigger this deployment when new code is pushed. Rolling Updates: You want to perform rolling updates to your application without downtime. ...

September 16, 2024 · 3 min

MongoDB Master Slave Setup

Resource https://www.mongodb.com/docs/v2.4/core/master-slave/ IMPORTANT If stuck, first check netstat -tulnp and mongod -f config.conf to see if it is running or not. Make sure both are on same VPC with security groups configured. Use mongod -f config_file.conf to start with forked processes to run them. Here is SECONDARY node config file slave.conf storage: dbPath: /usr/local/var/mongodb/slave net: bindIp: 0.0.0.0 port: 27017 security: authorization: enabled keyFile: /usr/local/var/mongodb/pki/replicaset-keyfile systemLog: destination: file path: /usr/local/var/log/mongodb/slave/mongod.log logAppend: true processManagement: fork: true replication: replSetName: master-slave BindIp means it is listening to IP addresses mentioned. Here 0.0.0.0 means all of them, 127.0.0.1 is same as localhost only. It must listen at 0.0.0.0 to listen to all connections as slave. ...

September 14, 2024 · 3 min

Kubernetes YAML syntax

Kubernetes YAML syntax https://betterprogramming.pub/understanding-kubernetes-yaml-syntax-83359d33f9c2 Key-values multiple key-values key1: value 1 key2: value 2 single key with map key1: subkey1: value 1 subkey1: value 2 subkey1: value 3 equivalent json for above { "key1": { "subkey1": "subvalue1", "subkey2": "subvalue2", "subkey3": "subvalue3" } } Lists list: - item1 - item2 - item3 - item4 - item5 equivalent json { "list": ["item1", "item2", "item3", "item4", "item5"] } List can contain multiple maps list: - item1 - mapItem1: value mapItem2: value - item3 - item4 - item5 equivalent json ...

September 14, 2024 · 4 min

MongoDB vs DocumentDB

MongoDB is also known as DocumentDB or NoSQL database. The reason it is called documentDB is it stores and retrieves data in the form of semi-structured or unstructured documents DocumentDB DocumentDB is AWS offering for NoSQL database which stores data in semi-structured data as documents than traditional relational data with fixed schema. It provides high scalability, high availability and security and works well for applications that require LOW latency and HIGH throughput for read/write operations. ...

September 13, 2024 · 6 min

StatefulSets vs Deployments

StatefulSets and Deployments are both controllers in Kubernetes that are used to manage the deployment and scaling of pods. StatefulSets are designed to manage stateful applications, such as databases or other distributed systems, that require stable network identities, stable storage, and ordered deployment and scaling. StatefulSets use stable network identities, which means that each pod in the set has a stable, unique hostname that persists across restarts. They also use stable storage, which means that each pod has its own persistent storage that is managed by a persistent volume claim. ...

September 13, 2024 · 2 min