Graal VM:云原生时代的Java(转载)
Created|Cloud NativeJava
|Word Count:0|Reading Time:1mins
Author: zhongmingmao
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles

2022-09-13
Spring Security OAuth2 - Authorization Server
授权服务器 Introspection Endpoint:校验 Access Token 的合法性 Spring Security OAuth2 架构 Authorization flowAuthorization Code Flow Maven12345678<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId></dependency><dependency> <groupId>org.springframework.security.oauth</groupId> <artifactId>spring-security-oauth2</artifactId></dependency> API1234567@Data@Builder@FieldDefaults(level = ...

2022-04-16
Go Engineering - Specification - Design Method
Go 项目 Go 项目是一个偏工程化的概念,包含 Go 应用 Go 应用 代码结构按层拆分 最大的问题:相同功能可能在不同层被使用,而这些功能又分散在不同的层中,容易造成循环引用 12345678910├── controllers│ ├── billing│ ├── order│ └── user├── models│ ├── billing.go│ ├── order.go│ └── user.go└── views └── layouts 按功能拆分 Go 项目最常用的拆分方法 不同模块,功能单一,可以实现高内聚低耦合的设计哲学 所有功能只实现一遍,引用逻辑清晰,大大减少循环引用的概率 12345pkg├── billing├── order│ └── order.go└── user 代码规范编码规范 Uber Go 语言编码规范 静态代码检查工具:golangci-lint 最佳实践 Effective Go Go Code Review Comments Style guideline for Go packages 代码质量编写...

2022-12-02
Kubernetes - etcd
概述 CoreOS 基于 Raft 开发的分布式 KV 存储,可用于服务发现、共享配置和一致性保障(Leader 选举、分布式锁) A distributed, reliable key-value store for the most critical data of a distributed system Key Desc KV 存储 将数据存储在分层组织的目录中,类似于标准的文件系统 监测变更 监测特定的 Key 或者目录以进行变更,并对值的更改做出反应 简单 curl: HTTP + JSON 安全 TLS 客户端证书认证,有一套完备的授权认证体系,但 Kubernetes 并没有使用 快速 单实例:1000 TPS、2000 QPS 可靠 使用 Raft 算法保证分布式一致性 主要功能 基本的 KV 存储 - Kubernetes 使用最多 监听机制 Key 的过期和续约机制,用于监控和服务发现 原生支持 Compare And Swap 和 Compare And Delete,用于 Leader 选举和分布式锁 KV 存储 KV...

2022-12-10
Kubernetes - Pod Life Cycle
生命周期 Pending - 调度尚未成功,ContainerCreating - 完成调度 Pod 状态机 Pod Phase Pod Phase: Pending / Running / Succeeded / Failed / Unknown k get pod 显示的 STATUS 是由 pod.status.phase 和 pod.status.conditions 计算得出 123$ k get po nginxNAME READY STATUS RESTARTS AGEnginx 1/1 Running 0 35s k get po nginx -oyaml 12345678910111213141516171819202122232425262728293031status: conditions: - lastProbeTime: null lastTransitionTime: "2022-08-28T07:00:45Z" status...

2025-01-03
Observability - OpenTelemetry Node.js
OverviewStatus and Releases Traces Metrics Logs Stable Stable Development Client instrumentation for the browser is experimental and mostly unspecified. Version Support OpenTelemetry JavaScript supports all active or maintenance LTS versions of Node.js. Previous versions of Node.js may work, but are not tested by OpenTelemetry. OpenTelemetry JavaScript has no official supported list of browsers. It is aimed to work on currently supported versions of major browsers. OpenTelemetry JavaScript f...

2022-12-05
Kubernetes - Controller Manager
工作流程 Informer Framework 和 Lister Framework 可以借助代码生成器生成 Lister 维护了一份 API Server 的缓存数据(减少对 API Server 的访问压力) Informer 会通过 Indexer 为对象计算一个 Key,然后入队,Worker 会消费队列,并从 Lister 查询缓存数据 核心 Controller Controller Manager 是 Controller 的集合 Controller Desc API Job Controller 处理 Job Cronjob Controller 处理 Cronjob Pod AutoScaler 处理 Pod 的自动扩缩容 HorizontalPodAutoscaler RelicaSet 依据 RelicaSet Spec 创建 Pod Service Controller 依据 Service 的 LoadBalancer Type 创建 LB VIP ServiceAccount Controller 确保 Servi...
Announcement
Things are always unexpected!





