Posts

Showing posts from April, 2024

Why can't I build AWS OpenSearch/ElasticSearch index, which I could do that before?

One of the reason when you used to build AWS OS/ES index, and you can't do that now, is that there is a maximum shard default setting in AWS, which is 1000 shards. If you continuously build index, yet you did not remove old indices, there will be an increasing number of shards that occupied OS/ES. Until when a new index is built, and new shard is created that exceed the number of maximum shard, you got an error. Solution: Remove old/existing OS/ES indices. While it works for AWS, if you are using on-premise, it should be applied as well. Hope it helps someone.

[Easy to understand] What are Service, Service Container and Service Provider in PHP Laravel?

Imagine you are running a restaurant. Let's break down the concepts of Service, Service Container, and Service Provider using this restaurant analogy: Service: In our restaurant analogy, a service is like a specific task or job that needs to be done. For example, a "Waiter Service" would involve taking orders, serving food, and delivering the bill to the customers. Each service has a specific responsibility. Service Container: The service container is like the restaurant itself. It holds all the services (tasks) that need to be performed. Just like how a restaurant has different sections (kitchen, dining area, bar), the service container in Laravel holds different services that can be accessed when needed. When a customer (controller) needs a specific service (task), they ask the restaurant (service container) to provide it. Service Provider: The service provider is like the manager of the restaurant. They are responsible for setting up the restaurant, organizing the serv

[Easy to understand] What is Kafka Consumer, Consumer Group, Topic & Partition?

Kafka: Kafka is a distributed streaming platform that allows you to publish and subscribe to streams of records, similar to a message queue or enterprise messaging system. Consume: Consuming in Kafka means reading data from a topic. Consumers read messages from topics and process them. Consumer Group: A consumer group is a set of consumers that cooperate to consume data from Kafka brokers. Each message within a topic is delivered to one consumer instance within each subscribing consumer group. This allows you to scale processing by adding more consumers to a group. Topic: A topic is a category/feed name to which records are sent by producers. Topics in Kafka are always multi-subscriber; that is, a topic can have zero, one, or many consumers that subscribe to the data written to it. Partition: Topics in Kafka are divided into partitions. Each partition is an ordered, immutable sequence of records that are continually appended to. Each message within a partition is assigned a unique offs

[Easy to understand] Apache Kafka Listener and Advertised Listener

A plain, simple, even novice can understand explanation on what is Apache Kafka LISTENER and ADVERTISED_LISTENER. Imagine you are hosting a big party where people need to communicate with each other. In the world of Apache Kafka, the "Listener" is like the door or entrance to your party. It's where your guests (data producers and consumers) come in to interact with Kafka. Now, let's talk about the "Advertised Listener." This is like the address you give to your guests so they know how to find your party. Just like you might share your home address with friends to visit you, in Kafka, the Advertised Listener is the address that other services or clients use to connect to Kafka. In simpler terms, the Listener is where the communication happens within the Kafka system, while the Advertised Listener is the address that is shared with external services to connect to Kafka. For example, let's say your Kafka server has an internal IP address of 192.168.1.100 b