Skip to main content

Posts

An introduction to Kubernetes Overview.

What is a Container?  A container is simply like a software unit/wrapper that will package everything- your application code, app-related dependencies, etc. together. You can assume that you get a portable environment to easily run your application. You can easily manage the container on your own (operations like starting, stopping, monitoring, etc.).  Why Kubernetes?  Suppose, you have a requirement for running 10 different applications (microservices) ~ 10 containers.  In case you need to scale each application for high availability, you create 2 replicas for each app ~ 2 * 10 = 20 containers. Now you have to manage 20 containers.  Would you be able to manage 20 containers on your own? (20 is just an example, there could be more based on the requirement). It would be difficult, for sure. Orchestration A Container Orchestration tool or framework can help you in such situations. It can help you automate all the deployment/management overhead. One such Container Orchestration tool is Ku
Recent posts

How Caching Helps In Improving Performance Of Application

In the computing world, when we are looking at performance improvement for quick wins, we first look into caching. Caching stores frequently accessed data in a fast and convenient way, reducing the load on your database. It is helpful to access more frequent data quickly and to avoid any additional computation that was done to fetch and store previous data. Caching stores the data for a small duration of time and turns slower operations into faster performance. Caching is largely divided into two types: a local cache and external cache. A local cache uses the JVM heap for storage, and a remote (or cluster) cache uses in-memory stores such as Redis or Memcached. Types of Caching Strategies and Their Challenges Local Cache: A local cache is easier to implement by having some sort of storage within the service (say, a Hashmap) but leads to a cache coherence problem. That is, being a local cache, it will be different per server and lead to inconsistent data. External Caches: External cache

Serverless Architecture Using AWS Lambda as a Microservice

😎 Imagine in few minutes you can launch your serverless microservice with the help of using AWS lambda, API gateway to offer fastest path to production to help engineers efficiently build and scale applications.  One of the biggest advantage of using AWS Lambda cloud service is that it can be deployed independently. Also, offers the opportunity to work many other different technologies and last but not the least but using this can quickly increase scalability and high availability of system.  AWS Lambda as a Microservice AWS Lambda is a service that allows you to run your functions in the cloud completely Serverless and eliminates the operational complexity. You upload your code to Lambda, and it takes care of everything needed to run and scale its execution and fulfils conditions and high availability requirements. Its easy to deploy your builds and service related configurations in the lambda function.  It integrates with the API gateway, allows you to invoke functions with the API

System design fundamentals: What is the CAP theorem?

👋 CAP Theorem is one of the important concepts used in Distributed Systems.  Its applicability to various systems states that any distributed system or data store can simultaneously provide only two of three guarantees: consistency, availability, and partition tolerance (CAP).The theorem formalizes the tradeoff between consistency and availability when there’s a partition. A distributed system is a network that stores data on more than one node (physical or virtual machines) at the same time. Because all cloud applications are distributed systems, it’s essential to understand the CAP theorem when designing a cloud app so that you can choose a data management system that delivers the characteristics your application needs most. CAP Theorem Proof Let’s look at a simple proof of the CAP theorem. Imagine a distributed system consisting of two nodes: The distributed system acts as a plain register with the value of variable X. There’s a network failure that results in a network partition b

Garbage Collection And It's impact on JVM Performance

👉 Garbage collection is one of those things that is generally known to impact performance, but beyond that – in terms of how it actually works – it’s pretty much a mystery to most of us. So I thought I'd take a whack at covering the basics of GC, especially since this is an area that has seen some major changes and improvements with Java 8, especially with the removal of the PermGen and some new and exciting optimisations (more on this toward the end). When we think about garbage collection, the vast majority of us know the concept and employ it in our everyday programming. Even so, there’s much about it we don’t understand, and that’s when things get painful. One of the biggest misconceptions about the JVM is that it has one garbage collector, where in fact it provides four different ones, each with its own unique advantages and disadvantages. The choice of which one to use isn’t automatic and lies on your shoulders and the differences in throughput and application pauses can be

How to Execute Database Migrations using Go Migrate

A database migration, also known as a schema migration, is a set of changes to be made to a structure of objects within a relational database 😏. The process of migration helps to change the database schema from its current state to a new desired state, whether it involves adding tables and columns, removing elements, splitting fields, or changing types and constraints. By managing these changes in a programmatic way, it becomes easier to maintain consistency and accuracy in the database, as well as keep track of the history of modifications made to it. Setup and Installation migrate is a CLI tool that you can use to run migrations. You can easily install it on various operating systems such as Linux, Mac and Windows by using package managers like curl, brew, and scoop, respectively. For more information on how to install and use the tool, you can refer to the official documentation. To install the migrate CLI tool using scoop on Windows, you can follow these steps: $ scoop install m

Maps In GoLang

✌ Go provides another important data type map that maps unique keys to values. A key is an object that you use to retrieve a value at a later date. Given a key and a value, you can store the value in a Map object. After the value is stored, you can retrieve it by using its key. A Go map type looks like this: map[KeyType]ValueType Declaration and initialization: 1) m := make(map[string]int) 2) m := map[string]int{} 3) var m map[string]int{} Map to get key of value : 1). i := m["route"] 2). i, ok := m["route"] 3). for key, value := range m {            fmt.Println("Key:", key, "Value:", value)      } The built-in len function returns on the number of items in a map: n := len(m) The built-in delete function removes an entry from the map: delete(m, "rouzte") GO Program : package main import ( "fmt" ) func main() {                var m = make(map[st