본문 바로가기

전체 글

(24)
Leetcode: Evaluate Division You are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [Ai, Bi] and values[i] represent the equation Ai / Bi = values[i]. Each Ai or Bi is a string that represents a single variable. You are also given some queries, where queries[j] = [Cj, Dj] represents the jth query where you must find the answer for Cj / Dj = ?. Return the answers to all q..
Apache Kafka 기본 개념 (Partition / Consumer / Consumer Group/ Offset Management) Kafka는 가장 널리 쓰이는 메세지 큐 솔루션 중 하나이다. 다른 메세지 큐와 마찬가지로, Producer가 메세지를 publish하면 Consumer가 큐를 susbscribe하며 메세지를 가져가게 된다. 다만, 이 사이에 Topic / Partition / Consumer Group과 같은 개념이 등장하게 된다. How Messages are storedKafka Message는 Disk에 저장이 되고, 일정 기간동안 / 또는 일정 용량에 다다를 때까지 저장할 수 있다. 이 값은 각각 토픽의 아래 property들로 설정이 된다. `retention.ms`: 메세지가 설정된 값 이상으로 오래 되었으면 삭제한다. (default: 604800000 ms = 7일)`retention.bytes`: 해당..
Leetcode: Minimum Operations to Reduce X to Zero You are given an integer array nums and an integer x. In one operation, you can either remove the leftmost or the rightmost element from the array nums and subtract its value from x. Note that this modifies the array for future operations. Return the minimum number of operations to reduce x to exactly 0 if it's possible, otherwise, return -1. Example 1: Input: nums = [1,1,4,2,3], x = 5 Output: 2..
Kubernetes Architecture (Master Node / Worker Node) 쿠버네티스 클러스터는 Control plane이라고도 불리는 마스터노드와 Worker 노드로 구성된다. 간략하게 구조를 그려보자면, 아래와 같다. 이제부터는 master node와 worker node를 이루는 쿠버네티스의 각 component에 대해 설명해보려 한다. Master Node API Server: 쿠버네티스 API를 노출하는 컴포넌트(REST)로, Kubenretes의 Frontend와 같다. 흔히 사용하는 kubectl과 같은 user interface는 모두 쿠버네티스와 interact하기 위해 API server를 통하게 된다. REST API이기 때문에, 어플리케이션에서도 클라이언트 라이브러리를 통해 호출할 수 있다. etcd: 분산 Key-Value store로, 모든 클러스터 데..