Pod Controller Detail

Pod Controller Overview Introduction Pods are the smallest management unit of kubernetes. In kubernetes, pods can be divided into two categories according to how they are created. Autonomous pods: Pods created directly by kubernetes. Such pods are not available after deletion and will not be rebuilt Controller-created pods: Pods created by kubernetes through the controller, which are automatically rebuilt after deletion. Controller Pod controller is the middle layer for managing pods.

Nginx-based load balancing

Introduction to Nginx Nginx is an open source software originally designed as a high-performance web server. Today, Nginx can perform a number of other tasks, including caching servers, reverse proxy servers, load balancers, and more. WEB SERVER At present, the mainstream use of web server software, mainly apache, nginx, tomcat, iis, etc., on a global scale, Apache is the most popular existing web server, but the most popular web server in the high-traffic website is indeed nginx, in our country, whether large or small Internet companies, the mainstream choice is also nginx as web server software.

Some concepts about asynchronous programming

When talking about asynchronous programming always involves various concepts, such as process, thread, parallel, concurrency, coroutine, just started to learn programming has been unable to understand the difference between these concepts, only know according to the document write write demo, now after learning the operating system gradually on these concepts to understand some clear, so write this blog to record a little. 1. Concurrent A logical flow whose execution overlaps in time with another flow is called a concurrent flow, and the two flows are said to run concurrently.

Build a mail server with Postal

I recently built a mail server with Postal and had a better experience than I expected, so I can’t wait to share my experience. Why build a mail server Sending emails is a common requirement for web services, such as account verification, password reset and so on. Generally it is recommended to use a third-party mail service, as self-built mail servers are not reputable enough to be easily judged as spam.

Circumventing HTTPS Restrictions in Android Development

After targetSDK upgrade to 28, Android forces network requests to use https protocol. On the public server, it’s easy to do, just enable https support. And there is no website that doesn’t support https now, right? However, this limitation is not so convenient when developing and debugging Android programs on your own computer. Probably Google has taken this into account and provided a method. First open the local server, assuming it is running on port 3000.

Selenium Grid build and use

The main components of Selenium testing are: Test Code, WebDriver, Grid (Selenium Server, not required), Browser Driver and Browser. When we finish writing Selenium test cases for local debugging, the WebDriver interacts directly with the browser through the browser driver. At this point, the WebDriver, the browser driver, and the browser are located on the same host. This most basic interaction is shown in the figure below. When the local

Load balancing technology: HAProxy

Introduction to HAProxy HAProxy is a proxy software that provides high availability, load balancing and proxy software for TCP (Layer 4) and HTTP (Layer 7) based applications, HAProxy is completely free and provides fast and reliable proxy solutions for TCP and HTTP based applications with the help of HAProxy. HAProxy stability is also very good, comparable to hardware-grade F5, according to the official documentation, HAProxy can run at 10 Gbps - New benchmark of HAProxy at 10 Gbps using Myricom’s 10GbE NICs (Myri- 10G PCI-Express), a value that is quite impressive for a software-level load balancer.

Load Balancing Technology: DNS Polling

Usually we say that a domain name is uniquely corresponded to an IP address, we enter a domain name in the browser, then the request is passed to the DNS server, the DNS server resolves this corresponding IP and returns it to the browser. However, in some cases, a domain name can correspond to multiple IP addresses, and this is called DNS polling. Through DNS polling, we can achieve some goals that are difficult to achieve under normal circumstances.

How to build a DNS service

What is a DNS server? DNS, or Domain Name System, is a basic service in computer networks. Generally speaking, there are two ways to access a host on the network: by host name, or by IP address. In the Internet, using an IP address to communicate with a server simply does not work for the following reasons. IP addresses are not easy to remember IP addresses change frequently, so accessing

How can I manage Kubernetes applications without writing YAML?

Kubernetes abstracts everything within its own boundaries as resources. The main part of this is the workload workload controller, represented by Deployment and StatefulSet, and all other resources work around these main resources. Combined, these resources present a workload-centric model for IT technologists. All resources in Kubernetes are described in declarative configuration files, which are defined by Yaml fields, giving IT technicians the greatest freedom while also placing high demands on their skills.

Golang Dynamic Script Research

1. Technical background 1.1 Dynamic linking technology for programs In the actual development process, we often need to dynamically update the functions of the program, or add or update the program modules without changing the main program files. 1.1.1 Dynamic Link Library The first and most common is the Dynamic Link Library (DLL) supported by the Windows platform, usually with the suffix .dll. Its advantages are very obvious: multiple programs can share code and data.

C++ Simple Dependency Injection

1 Preface Some time ago, I was looking at the code of an old product, which was a mixed C/C++ code, and the code was full of global variables and used extern references to external global variables. The problem was that since there were dependencies between classes, if all dependencies were passed in through the constructor method, it would lead to a complex construction of the whole object dependency graph. For older code, using global variables + extern references can be a simple and brutal way to insert new call relationships to be added, but it also brings code corruption.

Configure different git configs for different directories

When using git on a daily basis, there is usually a global configuration file .gitconfig that all repo’s will use by default. If you need to configure a particular repo, you just need to modify the .git/config file in the repo. However, if you need to change more repo’s, it’s easy to forget and commit the wrong author’s commit. Demo For example, if you want to use different user.name and user.

Building flat container networks in Docker

There are many articles on the web about k8s flattening network construction, mostly for large-scale clusters. But now there are many people also use Docker deployment service in NAS or home server. This article focuses on how to use Docker to build a flat network and provide cross-host interoperability of containers. With the release of Docker in 2013, container technology started to come into major Internet companies. Container technology not only serves the online business of Internet companies, but also provides great convenience for developers to build test environments and three-party dependency services.

Rapid deployment of Cilium BGP environments using Containerlab + Kind

1 Pre-requisite knowledge 1.1 Introduction to Cilium Cilium is a Kubernetes CNI plug-in based on eBPF technology, which Cilium positions on its official website as being dedicated to providing a range of eBPF-based networking, observability, and security solutions for container workloads. Cilium implements networking, observability and security related features by using eBPF technology to dynamically insert control logic inside Linux that can be applied and updated without modifying application code or container configuration.

Kubernetes - Container Orchestration Engine (Resource Management)

What is a resource? All the content in K8s is abstracted as resources, and after resources are instantiated, they are called objects. List of resource types Workload Pod, ReplicaSet, Deployment, StatefulSet, DaemonSet, Job, CronJob (ReplicationController is deprecated in v1.11) Service Discovery and Load Balancing Service, Ingress … Storage Volume, CSI Configuration ConfigMap, Secret, DownwardAPI Cluster Namespace, Node, Role, ClusterRole, RoleBinding, ClusterRoleBinding Metadata HPA, PodTemplate, LimitRange List of resources What is a resource manifest?

Streams in gRPC

HTTP/2 has two concepts, stream and frame, where frame is the smallest transmission unit of communication in HTTP/2, usually a request or response is divided into one or more frames for transmission, and stream represents a virtual channel with established connection, which can transmit multiple requests or responses. Each frame contains a Stream Identifier that identifies the stream to which it belongs. HTTP/2 achieves multiplexing through streams and frames, and

gRPC's interceptor

In Web services, in addition to the actual business code, often need to achieve a unified record of request logs, rights management or exception handling and other functions, these in the web framework Gin or Django can be achieved through middleware, while gRPC can use interceptor, rpc request or response to intercept processing. gRPC server and client can implement their own interceptor, according to the two types of rpc requests

What is the difference between println and fmt.Println in Golang

1. Output location is different Looking at the source code of fmt.Println, it is obvious in the comments and the code: writes to standard output, the content is output to os.Stdout, which is the standard output. 1 2 3 4 5 6 // Println formats using the default formats for its operands and writes to standard output. // Spaces are always added between operands and a newline is appended. // It returns the number of bytes written and any write error encountered.

Duff's device and Go language zero values

I’ve heard of Duff’s device, an optimization of serial replication, for a long time. Recently, I found that Go language also uses the idea of Duff’s device when initializing zero values. So I took a closer look at it and share it with you today. If you need to copy a certain length of data to another address starting from a certain address, the simplest code is as follows. 1 2 3 4 5 6 send(short *to, short *from, int count) { do { *to++ = *from++; } while (--count > 0) } Because only one byte is copied in each loop, a total of count conditional branch judgments are performed.