DevilKing's blog

冷灯看剑,剑上几分功名?炉香无需计苍生,纵一穿烟逝,万丈云埋,孤阳还照古陵

0%

原文链接

典型的 Kubernetes 集群包含一个 master 和很多 node。Master 是控制集群的中心,node 是提供 CPU、内存和存储资源的节点。Master 上运行着多个进程,包括面向用户的 API 服务、负责维护集群状态的 Controller Manager、负责调度任务的 Scheduler 等。每个 node 上运行着维护 node 状态并和 master 通信的 kubelet,以及实现集群网络服务的 kube-proxy。

可以理解为 pod 都运行在一个内网,我们无法从外部直接访问。要把服务暴露出来,我们需要创建一个 Service。Service 的作用有点像建立了一个反向代理和负载均衡器,负责把请求分发给后面的 pod

横向扩展、滚动更新、版本回滚

Kubernetes 的用户通常是用 Deployment 来管理服务的。一个 deployment 可以创建指定数量的 pod 部署到各个 node 上,并可完成更新、回滚等操作。

k8s架构

世界上只有一种病,那就是穷病。。。

身处绝境的病人和悲伤的家人,哪怕有一点点的希望,也会迫不及待地抓住。

死亡也是不平等的。。


本周工作:

  • 上游接入部分
  • 关于es部分的修复,加入bulkprocessor部分,缓冲rejection error
  • 一些监控的梳理

本周所得:

  • 关于elasticsearch的bulkprocessor部分的一些知识

下周工作:

  • k8s的一些入门以及使用
  • spring boot的重新拣回来。。

最终的offer确定下来,也算是有人收留吧。找工作的事情,也算是告一段落了,整个历程方面,还是要写一写,总结一下。后面就是交接的事情,一步步来吧。。

事情算是定下来,心也要慢慢静下来,最近一段时间内,心不静,没有达成相应的目标,事情上也拖拉了一些,这些都要检讨一下,开始慢慢恢复和整理其中。。。

同居的生活上,还是按部就班地进行,不过,是不是时间安排上,有点问题,每个周末部分,以及每天晚上的时候,没有投入足够多的时间去学习,这点要检讨一下。。。还有就是,关于相处的方式上,还是有点捉摸不定,有时候,会有点烦躁。。。可能感觉自己还是不够放松吧。。总感觉没有照顾好别人,别人有理由,有条件去享受和追求更好的,而我。。。呵呵。。。也就这样吧。。。尽力而行,也没有太多可以给予的,反正最坏的打算也做了。。。

锻炼身体上,开始要保持节奏和频度,不能三天打鱼两天晒网了,将跑步恢复起来。。

加油,不管是物质上,还是精神上,找到有所缓解的方式的,找到自己心安的方式。。。

修禅,修心。。。

原文链接

The core of LXD is a privileged daemon which exposes a REST API over a local unix socket as well as over the network (if enabled).

Clients, such as the command line tool provided with LXD itself then do everything through that REST API. It means that whether you’re talking to your local host or a remote server, everything works the same way.

原文链接

Time series data

Each data point is a tuple of a timestamp and a value

A 64 bit float turns out to be a good representation for counter as well as gauge values, so we go with that. (时间戳?)

定义好相应的label部分

Vertical and Horizontal

1
2
3
4
5
6
7
8
9
10
11
12
13
14
series
^
│ . . . . . . . . . . . . . . . . . . . . . . {__name__="request_total", method="GET"}
│ . . . . . . . . . . . . . . . . . . . . . . {__name__="request_total", method="POST"}
│ . . . . . . .
│ . . . . . . . . . . . . . . . . . . . ...
│ . . . . . . . . . . . . . . . . . . . . .
│ . . . . . . . . . . . . . . . . . . . . . {__name__="errors_total", method="POST"}
│ . . . . . . . . . . . . . . . . . {__name__="errors_total", method="GET"}
│ . . . . . . . . . . . . . .
│ . . . . . . . . . . . . . . . . . . . ...
│ . . . . . . . . . . . . . . . . . . . .
v
<-------------------- time --------------------->

关于写放大的问题?

解决方案:

  • Writes are now batched, samples are stored sequentially
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$ tree ./data
./data
├── b-000001
│ ├── chunks
│ │ ├── 000001
│ │ ├── 000002
│ │ └── 000003
│ ├── index
│ └── meta.json
├── b-000004
│ ├── chunks
│ │ └── 000001
│ ├── index
│ └── meta.json
├── b-000005
│ ├── chunks
│ │ └── 000001
│ ├── index
│ └── meta.json
└── b-000006
├── meta.json
└── wal
├── 000001
├── 000002
└── 000003

Queried data can be rather aggressively cached in memory, yet under memory pressure the pages will be evicted. If the machine has unused memory, Prometheus will now happily cache the entire database, yet will immediately return it once another application needs it.