<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>闪电侠的小笔记</title>
    <link>https://chende.ren/</link>
    <description>Recent content on 闪电侠的小笔记</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Thu, 19 Nov 2020 04:52:05 +0000</lastBuildDate><atom:link href="https://chende.ren/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>日志收集新贵Loki</title>
      <link>https://chende.ren/2024/10/14212820-006-loki.html</link>
      <pubDate>Mon, 14 Oct 2024 21:28:20 +0800</pubDate>
      
      <guid>https://chende.ren/2024/10/14212820-006-loki.html</guid>
      <description>无论是ELK、EFK还是Filebeat，都需要用到Elasticsearch来存储数据，而Elasticsearch维护难度和资源使用都是偏高的。所以一个更轻量的日志收集平台-Loki应运而生。Loki是Grafana Labs开源的一个支持水平扩展、高可用、多租户的日志聚合系统。 Loki简介 包含三个组件 Loki：主服务器，负责日志的存储</description>
    </item>
    
    <item>
      <title>002 | 时序数据库</title>
      <link>https://chende.ren/2024/10/11001437-001-timing-db.html</link>
      <pubDate>Fri, 11 Oct 2024 00:14:37 +0800</pubDate>
      
      <guid>https://chende.ren/2024/10/11001437-001-timing-db.html</guid>
      <description>时序数据库全称为时间序列数据库。指主要用于处理带时间标签（按照时间的顺序变化，即时间序列化）的数据，带时间标签的数据也称为时间序列数据。 在过去的十年间，我们亲历了关系型、非关系型、在线分析处理(OLAP)型、以及在线事务处理(OLTP)型数据库的市场之争，根据DB-Engines的一项针对数据库管理系统调查的统计，时序型数据库(time series</description>
    </item>
    
    <item>
      <title>微服务006 | istio初探</title>
      <link>https://chende.ren/2024/10/01004939-007-istio-intr.html</link>
      <pubDate>Tue, 01 Oct 2024 00:49:39 +0800</pubDate>
      
      <guid>https://chende.ren/2024/10/01004939-007-istio-intr.html</guid>
      <description>istio代表着一种工程实践，是一系列云原生基础设施工具集的集合。 认识istio之前，先了解下Service Mesh。Service Mesh 之所以被看好，主要有4个原因： 它是一个独立的进程，和业务是解耦的，对业务代码无侵入； 具备跨语言特性，Dubbo 和 Spring Cloud 其实都是 Java 技术栈，而 Service Mesh 具备整合一些 C++、Golang 之类的异构语言应用的能力，因为它没</description>
    </item>
    
    <item>
      <title>微服务005 | 微服务的演进</title>
      <link>https://chende.ren/2024/09/30213335-005-micro-trans.html</link>
      <pubDate>Mon, 30 Sep 2024 21:33:35 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/30213335-005-micro-trans.html</guid>
      <description>不要为了微服务而微服务。本文通过一个例子带领大家从头到尾体验一下微服务的演化过程，不仅要做到知其然，更要做到知其所以然。 单体应用 假设我们正在开发一个在线购物项目，其主要功能包括商城、推荐、评论、用户等，它是一个典型的单体架构：不同团队的技术人员工作在同一个版本库上，系统功能按模块划分，不同模块之间通过本地函数调用，通常操作同一个数据库。 项</description>
    </item>
    
    <item>
      <title>004 | MQTT &#43; Kafka</title>
      <link>https://chende.ren/2024/09/28093242-004-mqtt-kafka.html</link>
      <pubDate>Sat, 28 Sep 2024 09:32:42 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/28093242-004-mqtt-kafka.html</guid>
      <description>很多时候我们谈到MQTT，发现其和MQ的很多概念是一致的。那么MQTT也是一种MQ吗？MQTT 并不是消息队列，尽管两者的很多行为和特性非常接近，比如都采用发布订阅模式等，但是他们面向的场景有着显著的不同。 MQTT和MQ的主要区别 MQTT：一种通信协议，类似人类交谈中的汉语、英语、俄语中的一种语言规范。 MQ：一种通信通道，也叫消息队列，类似</description>
    </item>
    
    <item>
      <title>003 | MQTT</title>
      <link>https://chende.ren/2024/09/26234602-003-mqtt.html</link>
      <pubDate>Thu, 26 Sep 2024 23:46:02 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/26234602-003-mqtt.html</guid>
      <description>前面我们已经研究了Kafka，这里我们再学习MQTT协议相关知识，最后你会发现两者结合使用才是精彩绝伦。 MQTT（Message Queuing Telemetry Transport，消息队列遥测传输协议）是一种轻量级、基于发布-订阅模式的消息传输协议，适用于资源受限的设备和低带宽、高延迟或不稳定的网络环境。它在物联网应用中广受欢迎，能够实现传感器、执行器和其它设备之间</description>
    </item>
    
    <item>
      <title>学习 | DDD（领域驱动设计）</title>
      <link>https://chende.ren/2024/09/26123641-001-ddd-dev.html</link>
      <pubDate>Thu, 26 Sep 2024 12:36:41 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/26123641-001-ddd-dev.html</guid>
      <description>今天的软件相对之前的软件，需求越来越复杂，变化越来越快。软件架构不断的在演进，一方面是为了适应新的需求，一方面也在寻找软件简单化解决方案，通过架构的规范是的软件更容易维护，逻辑更清晰。所以架构一直在追求易维护、可扩展。往往软件在开发初期，架构合理、分层清晰，但进过多年维护后，系统变得一团乱码。 究其原因，主要是大家面向业务开发，直达业务实现</description>
    </item>
    
    <item>
      <title>002 | NATS</title>
      <link>https://chende.ren/2024/09/24163157-002-nats.html</link>
      <pubDate>Tue, 24 Sep 2024 16:31:57 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/24163157-002-nats.html</guid>
      <description>Install docker安装并运行broker 1 2 3 4 5 docker pull docker.m.daocloud.io/nats:latest docker run -itd -p 4222:4222 docker.m.daocloud.io/nats:latest # -js 指的是 jetstream 模式 docker run -itd --name jetstream -p 4222:4222 docker.m.daocloud.io/nats:latest -js 或者直接下载所有可执行文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 # 分别是：Broker, 客户端命令行，监控工具，go-SDK https://github.com/nats-io/nats-server https://github.com/nats-io/natscli https://github.com/nats-io/nats-top https://github.com/nats-io/nats.go # 得到可执行文件后，运行JetStream ./nats-server -js -m 8222 [INF] Starting nats-server [INF] Version: 2.10.21 [INF] Starting http monitor on 0.0.0.0:8222 [INF] Starting JetStream [INF] Listening for client connections on 0.0.0.0:4222 [INF] Server is ready # 运行监控 ./nats-top</description>
    </item>
    
    <item>
      <title>001 | Kafka部署实战</title>
      <link>https://chende.ren/2024/09/24163035-001-kafka-install.html</link>
      <pubDate>Tue, 24 Sep 2024 16:30:35 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/24163035-001-kafka-install.html</guid>
      <description>作为 Zookeeper 的替代，Kafka 3.3.1 提供了 KRaft 元数据管理组件。KRaft 替换 ZK，并不是元数据存储重新造轮子，而核心是集群协调机制的演进。整个通信协调机制本质上是事件驱动模型，也就是 Metadata as an Event Log，Leader 通过 KRaft 生产权威的事件，Follower 和 Broker 通过监听 KRaft 来获得这些事件，并且顺序处理事件，达到集群状态和期望的最终一致。 Kafka集群中的节点类型</description>
    </item>
    
    <item>
      <title>001 | Kafka</title>
      <link>https://chende.ren/2024/09/24163034-001-kafka.html</link>
      <pubDate>Tue, 24 Sep 2024 16:30:34 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/24163034-001-kafka.html</guid>
      <description>1. Kafka概述 在 Kafka 架构中，有几个术语需要了解下。 Zookeeper：Kafka 通过 ZooKeeper 存储集群的 Meta 信息等； Controller：Kafka 集群中的一个服务器，用来进行 Leader Election 以及各种 Fail Over； Broker：Kafka 集群由多个 Kafka 实例（Server）组成，每个实例构成一个 Broker，其实就是服务器； Producer：生产者，即消息发送者，P</description>
    </item>
    
    <item>
      <title>000 | 消息队列简介</title>
      <link>https://chende.ren/2024/09/23164553-000-mq-intr.html</link>
      <pubDate>Mon, 23 Sep 2024 16:45:53 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/23164553-000-mq-intr.html</guid>
      <description>当今市面上有很多主流的消息队列中间件，比如ActiveMQ、RabbitMQ，Kafka，Pulsar、RocketMQ、NSQ、NATS、RedisStream、MQTTBroker等，生产中如何选择相应产品值得探究。 MQ（Message Queue）消息队列，是基础数据结构中“先进先出”的一种数据结构。指把要传输的数据（消息）放在队列中</description>
    </item>
    
    <item>
      <title>K8s010 | StatefulSet应用部署</title>
      <link>https://chende.ren/2024/09/20162606-010-k8s-stateful.html</link>
      <pubDate>Fri, 20 Sep 2024 16:26:06 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/20162606-010-k8s-stateful.html</guid>
      <description>K8s部署业务应用程序非常方便，但是一些有状态应用比如数据库、消息队列等应用就相对复杂的多，这些应用普遍对数据处理性能、数据一致性要求很高，这就是K8s原生存储要解决的问题。 StatefulSet特点 StatefulSet 用来管理某 Pod 集合的部署和扩缩， 并为这些 Pod 提供持久存储和持久标识符。和 Deployment 类似， StatefulSet 管理基于相同容器规约的一组 Pod。但和 Deployment 不同的是， StatefulSet 为它们的</description>
    </item>
    
    <item>
      <title>算法003 | 国家商用密码简介</title>
      <link>https://chende.ren/2024/09/19143029-sm1-9.html</link>
      <pubDate>Thu, 19 Sep 2024 14:30:29 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/19143029-sm1-9.html</guid>
      <description>国密算法简介 国密算法是我国自主研发的密码算法体系，是为保护我国信息安全而开发的一套密码学算法，其标准由国家密码管理局及其密码管理标准委员会制定。 国密算法包括对称密码算法、非对称密码算法和杂凑算法，即SM1、SM2、SM3、SM4、SM7、SM9、祖冲之密码算法（ZUC）等。其中，SM1是一种分组密码算法，用于加密和解密数据，该算法未公开；</description>
    </item>
    
    <item>
      <title>K8s009 | 网络方案</title>
      <link>https://chende.ren/2024/09/16184409-009-k8s-net.html</link>
      <pubDate>Mon, 16 Sep 2024 18:44:09 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/16184409-009-k8s-net.html</guid>
      <description>阿里云 K8S 集群网络目前有两种方案：一种是 flannel 方案；另外一种是基于 calico 和弹性网卡 eni 的 terway 方案。Terway 和 flannel 类似，不同的地方在于 terway 支持 Pod 弹性网卡，以及 NetworkPolicy 功能。 Service 在 Kubernetes (k8s) 中，Service 对象定义了一种访问 Pod 组的方式，它提供了负载均衡和名称解析。Service 有几种不同的类型，每种类型都适用于特定的使用场景： 1、ClusterIP： 这是默认的 Service 类型，</description>
    </item>
    
    <item>
      <title>网络编程003 | 负载均衡技术</title>
      <link>https://chende.ren/2024/09/13152947-003-slb.html</link>
      <pubDate>Fri, 13 Sep 2024 15:29:47 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/13152947-003-slb.html</guid>
      <description>参考： 一篇读懂分布式架构下的负载均衡技术：分类、原理、算法、常见方案等： https://zhuanlan.zhihu.com/p/64207926 构建弹性网络之分布式负载均衡技术： https://cloud.tencent.com/developer/article/2437448 https://cloud.tencent.com/developer/article/2449586 （完）</description>
    </item>
    
    <item>
      <title>SaaS001-多租户系统设计</title>
      <link>https://chende.ren/2024/09/13102430-001-saas.html</link>
      <pubDate>Fri, 13 Sep 2024 10:24:30 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/13102430-001-saas.html</guid>
      <description>参考： https://weibo.com/ttarticle/p/show?id=2310474843325646831696 （完）</description>
    </item>
    
    <item>
      <title>Go杂谈 | 高效数据编解码</title>
      <link>https://chende.ren/2024/09/11171227-004-data-codec.html</link>
      <pubDate>Wed, 11 Sep 2024 17:12:27 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/11171227-004-data-codec.html</guid>
      <description>序列化和反序列化贯穿于微服务系统之间，如何简单高效的处理数据变的异常重要。常见的数据编解码方案中Protobuf、Avro等算是其中的佼佼者。出色的编解码方案都有哪些特点呢？以及还有没有性能更优或者使用更简单的方法呢？我们来探究一下。 Varint &amp;amp; Zigzag Varint varint用每个字节的第1位来标识本字节是否是一个数的尾部，0代表是尾部，1代表需要利用后面的字</description>
    </item>
    
    <item>
      <title>算法002 | 常见排序方法</title>
      <link>https://chende.ren/2024/09/03172611-002-sort.html</link>
      <pubDate>Tue, 03 Sep 2024 17:26:11 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/03172611-002-sort.html</guid>
      <description>全排列 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 func fullList(list []int, pos int) { size := len(list) if pos == size { count++ fmt.Printf(&amp;#34;%d %v\n&amp;#34;, count, list) return } for i := pos; i &amp;lt; size; i++ { list[pos], list[i] = list[i], list[pos] appendArr(list, pos+1) list[pos], list[i] = list[i], list[pos] } } 堆排序 参考： https://cloud.tencent.com/developer/article/1366827 https://www.cnblogs.com/cangqinglang/p/15069197.html DFS &amp;amp; BFS 参考： https://zhuanlan.zhihu.com/p/386595111</description>
    </item>
    
    <item>
      <title>Redis002 | 产品技术特点汇总</title>
      <link>https://chende.ren/2024/09/02085305-002-power.html</link>
      <pubDate>Mon, 02 Sep 2024 08:53:05 +0800</pubDate>
      
      <guid>https://chende.ren/2024/09/02085305-002-power.html</guid>
      <description>Redis持久化机制 Redis 提供了两种不同的持久化方式： RDB（Redis DataBase）：在指定的时间间隔内将内存中的数据集快照写入磁盘，也就是Snapshotting。 AOF（Append Only File）：保存Redis服务器所执行的所有写操作命令到文件。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 # RDB是默认的持久化方式。在一定时间间隔内将内存中的数</description>
    </item>
    
    <item>
      <title>Go随笔 | 借力SSA</title>
      <link>https://chende.ren/2024/08/30113247-013-ssa.html</link>
      <pubDate>Fri, 30 Aug 2024 11:32:47 +0800</pubDate>
      
      <guid>https://chende.ren/2024/08/30113247-013-ssa.html</guid>
      <description>Go的世界除了Plan9还有个SSA 参考： https://blog.csdn.net/bigwhite20xx/article/details/127469787 （完）</description>
    </item>
    
    <item>
      <title>MySQL003 | 数据传输协议</title>
      <link>https://chende.ren/2024/08/25102105-003-adpt-proxy.html</link>
      <pubDate>Sun, 25 Aug 2024 10:21:05 +0800</pubDate>
      
      <guid>https://chende.ren/2024/08/25102105-003-adpt-proxy.html</guid>
      <description>一、基本数据类型 MySQL协议定义了2大类，7小类的数据类型，它们详细介绍如下： 1.1 数字类型 1.1.1 定长数字类型（FixLenInt） MySQL报文中整型值分别有1、2、3、4、6、8字节长度。存储使用小端存储的方式，比如 2字节 02 00，表示数字 2 而不是 512。 1.1.2 变长数字类型(LenEncInt) 这一类型，字节长度可能为1、3、4、9四种情况。 数字</description>
    </item>
    
    <item>
      <title>Go随笔 | 汇编指令</title>
      <link>https://chende.ren/2024/04/09130344-012-plan9.html</link>
      <pubDate>Tue, 09 Apr 2024 13:03:44 +0800</pubDate>
      
      <guid>https://chende.ren/2024/04/09130344-012-plan9.html</guid>
      <description>Go的编译器先将源代码编译成Plan9风格的汇编指令，之后再通过汇编器和链接器生成不同平台的可执行程序。再深入研究源代码执行表现时，经常需要观察汇编指令，了解基本的Plan9汇编语法不可或缺。 CPU寄存器 32位x86架构的CPU有8个32位的通用寄存器（EAX，ECX，EDX，EBX，ESP，EBP，ESI，EDI），在汇编语言中可以通过</description>
    </item>
    
    <item>
      <title>OS002 | 计算机系统内存管理</title>
      <link>https://chende.ren/2024/03/27153433-001-os-mem.html</link>
      <pubDate>Wed, 27 Mar 2024 15:34:33 +0800</pubDate>
      
      <guid>https://chende.ren/2024/03/27153433-001-os-mem.html</guid>
      <description>CPU如何访问内存 CPU访问内存示意图 进程虚拟地址到物理地址转换示意图 根据逻辑地址A和页面大小D，得到页号P=floor(A/D)，页内偏移量W=A%D。 判断越界，如果P≥M则越界，即页号比最大页号M还大就有问题了。 页表项的地址=起始地址F + 页号P × 页面大小D (这个是内存中的页表的物理地址）或者=F+A-W 物理地址E = 块号b × 页面大小D +</description>
    </item>
    
    <item>
      <title>Rust001-内存管理特点</title>
      <link>https://chende.ren/2024/01/03134252-001-mem.html</link>
      <pubDate>Wed, 03 Jan 2024 13:42:52 +0800</pubDate>
      
      <guid>https://chende.ren/2024/01/03134252-001-mem.html</guid>
      <description>参考阅读： https://zhuanlan.zhihu.com/p/473149603</description>
    </item>
    
    <item>
      <title>HTTP3简介</title>
      <link>https://chende.ren/2023/07/19153835-http3.html</link>
      <pubDate>Wed, 19 Jul 2023 15:38:35 +0800</pubDate>
      
      <guid>https://chende.ren/2023/07/19153835-http3.html</guid>
      <description>世界变化真快，转眼就到了HTTP3的时代。HTTP协议发展的时间轴是这样的： TCP的问题 TCP存在队头拥塞 QUIC QUIC（Quick UDP Internet Connections）是一种通用、安全、多路复用的传输层新型网络协议。它的目的是替代TCP（目前是互联网上用于数据传输的主流协议）。2012年，QUIC协议由当时还在谷歌任职的Jim Roskind开发。20</description>
    </item>
    
    <item>
      <title>Go随笔 | Copy &amp;&amp; Append</title>
      <link>https://chende.ren/2023/04/06110148-011-copy-append.html</link>
      <pubDate>Thu, 06 Apr 2023 11:01:48 +0800</pubDate>
      
      <guid>https://chende.ren/2023/04/06110148-011-copy-append.html</guid>
      <description>很多时候我们需要对数据进行复制，在申请新的内存空间之后，我们可以用copy、append、for来复制拷贝。性能如何呢？ 拷贝测试 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 var target []byte var source string func init() { target = make([]byte, 256, 256) source = &amp;#34;asdfas+dfjad;sfja;dsfja;sdfjad;sjf;asdjf adsjfadsjfaksj&amp;#34; } func CopyArray() { copy(target, source) } func AppendArray() { target = target[0:0] target = append(target, source...) } func LoopAppendArray() { tmp := target[0:0] for i := range</description>
    </item>
    
    <item>
      <title>Ascii对照表</title>
      <link>https://chende.ren/2023/03/30154043-ascii.html</link>
      <pubDate>Thu, 30 Mar 2023 15:40:43 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/30154043-ascii.html</guid>
      <description>Ascii编码 Base64编码 标准Base64的码表如下： 为了适应网络传输，有些地方将 +/ 字符 替换成 -_ 字符（现实中还存在许多为适应不同场景，自定义各种可见字符来代替+/）。 填充 base64编码时将ascii字符串每3个一组编码成4个base64字符，当最后的ascii字符不足3个时，可以填充特定位（0值）来促成编码，同时得到的base64字</description>
    </item>
    
    <item>
      <title>Go总结（二四）| IO操作</title>
      <link>https://chende.ren/2023/03/28132456-024-io.html</link>
      <pubDate>Tue, 28 Mar 2023 13:24:56 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/28132456-024-io.html</guid>
      <description>参考阅读： https://new.qq.com/rain/a/20210723A029CK00 https://github.com/preytaren/go-doc-zh （完）</description>
    </item>
    
    <item>
      <title>Go随笔 | string数组检索</title>
      <link>https://chende.ren/2023/03/22133021-010-string-compare.html</link>
      <pubDate>Wed, 22 Mar 2023 13:30:21 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/22133021-010-string-compare.html</guid>
      <description>前面已经分析过在少量键值对检索的场景下，map的性能不如字符串数组直接检索。当时我们是用字符串数组循环遍历的方式做的测试。而实际上这种方式还有优化的空间。下面我们就来分析下字符串数组如何检索。 字符串== 看下面字符串比较的性能基准测试： 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 func CompareString(str1 string, str2 string) int { if str1 == str2 { return 5</description>
    </item>
    
    <item>
      <title>Go杂谈 | Protobuf、MsgPack等常见协议</title>
      <link>https://chende.ren/2023/03/21124440-003-json-rpc.html</link>
      <pubDate>Tue, 21 Mar 2023 12:44:40 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/21124440-003-json-rpc.html</guid>
      <description>JSON以其清晰明快横行，但网络大批量传输数据，序列化反序列化的场景下，和Protobuf这种数据传输协议相比，性能却不尽人意。为了解决JSON编解码性能差的问题，MsgPack给了我们新的选择。 JSON协议 菜鸟教程：https://www.runoob.com/json/json-syntax.html JSON 的两种结构： 1、对象：大括号 {} 保</description>
    </item>
    
    <item>
      <title>Go随笔 | map泛滥的世界</title>
      <link>https://chende.ren/2023/03/20203050-008-use-map.html</link>
      <pubDate>Mon, 20 Mar 2023 20:30:50 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/20203050-008-use-map.html</guid>
      <description>开发中经常需要用到map数据类型，主流编程语言也都实现了类似的功能，比如叫哈希、散列、map等等，实现数据结构都类似，性能不相上下。网上有很多关于map实现解析的文章。参考： https://www.jianshu.com/p/0a777dc7f7ae https://draveness.me/golang/docs/part2-foundation/ch03-datastructure/golang-hashmap 大家可能注意到，map使用过程中可能会根据键值对的增减而发生动态伸缩，而伸缩的过程是重新申请内存重建map的过程，旧的对象就需要进入GC回收。明显频繁使用map会</description>
    </item>
    
    <item>
      <title>Go框架 | 常见Go开发框架</title>
      <link>https://chende.ren/2023/03/20174622-003-fasthttp.html</link>
      <pubDate>Mon, 20 Mar 2023 17:46:22 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/20174622-003-fasthttp.html</guid>
      <description>Web开发库fasthttp 社区有人弄了个http库，用它可以大幅提升net/http标准库的性能。 项目地址：https://github.com/valyala/fasthttp 参考阅读： https://zhuanlan.zhihu.com/p/408572315 https://zhuanlan.zhihu.com/p/367927669 https://zhuanlan.zhihu.com/p/75929664 GoFr 项目地址：https://github.com/gofr-dev/gofr 参考阅读： https://www.cnblogs.com/cheyunhua/p/18615766</description>
    </item>
    
    <item>
      <title>Go杂谈 | err hell</title>
      <link>https://chende.ren/2023/03/15125344-002-err-nil.html</link>
      <pubDate>Wed, 15 Mar 2023 12:53:44 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/15125344-002-err-nil.html</guid>
      <description>被人吐槽最多的 if err != nil 参考阅读： https://mp.weixin.qq.com/s/L_Sy4_6BURL4XWDK6bpEwg https://mp.weixin.qq.com/s/XILveKzh07BOQnqxYDKQsA https://mp.weixin.qq.com/s/nzoFI8ANBVDP9VPWfDgoHw</description>
    </item>
    
    <item>
      <title>Go库004 | 内存管理器</title>
      <link>https://chende.ren/2023/03/15112625-004-mem-manager.html</link>
      <pubDate>Wed, 15 Mar 2023 11:26:25 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/15112625-004-mem-manager.html</guid>
      <description>Go自带GC，其runtime有一套完整的内存管理逻辑；主要运用了分层管理的思想。 参考阅读： https://blog.csdn.net/QcloudCommunity/article/details/125755238 https://blog.csdn.net/DouJiangMs/article/details/126238823 https://m.163.com/dy/article/HUU4O67F0518R7MO.html https://blog.csdn.net/qq_33690342/article/details/113685490 https://draveness.me/golang/docs/part3-runtime/ch07-memory/golang-memory-allocator/ 附录1：Go小对象内存分配策略 // class bytes/obj bytes/span objects tail waste max waste // 1 8 8192 1024 0 87.50% // 2 16 8192 512 0 43.75% // 3 24 8192 341 8 29.24% // 4 32 8192 256 0 21.88% // 5 48 8192 170 32 31.52% // 6 64 8192 128 0 23.44% // 7 80 8192 102 32 19.07% // 8 96 8192 85 32 15.95% // 9 112 8192 73 16 13.56% // 10 128 8192 64 0 11.72% // 11 144 8192 56 128 11.82% // 12 160 8192 51 32 9.73% // 13 176 8192 46 96 9.59% // 14 192 8192</description>
    </item>
    
    <item>
      <title>Go随笔 | 常见语句性能分析</title>
      <link>https://chende.ren/2023/03/06164620-009-asm-compare.html</link>
      <pubDate>Mon, 06 Mar 2023 16:46:20 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/06164620-009-asm-compare.html</guid>
      <description>https://blog.csdn.net/panda_8/article/details/106722195 Plan9汇编手册 https://blog.csdn.net/qq_45091883/article/details/123515862 汇编示例，可以仔细看看 因为编译器优化的问题，很多时候代码性能的优劣其实和我们想象中是不一样的。这里对常见代码性能做一些比较。 说明：我用go version go1.18.4 windows/amd64做的测试。 for循环判断条件 在for循环中，判断是否继续循环的条件，往往是一个表达式，执行时候会每次循环都计算一次表达式结果吗？看下面两种写法： 1 2 3</description>
    </item>
    
    <item>
      <title>学习 | CAP理论</title>
      <link>https://chende.ren/2023/03/05175811-cap-readme.html</link>
      <pubDate>Sun, 05 Mar 2023 17:58:11 +0800</pubDate>
      
      <guid>https://chende.ren/2023/03/05175811-cap-readme.html</guid>
      <description>CAP原则又称CAP定理，指的是在一个分布式系统中，Consistency（一致性）、 Availability（可用性）、Partition tolerance（分区容错性），三者不可得兼。分布式系统正变得越来越重要，大型网站几乎都是分布式的。分布式系统的最大难点，就是各个节点的状态如何同步。CAP 定理是这方面的基本定理，也是理解分布式系统</description>
    </item>
    
    <item>
      <title>Go总结（二三）| 定时器Timer</title>
      <link>https://chende.ren/2023/02/16161845-008-timer.html</link>
      <pubDate>Thu, 16 Feb 2023 16:18:45 +0800</pubDate>
      
      <guid>https://chende.ren/2023/02/16161845-008-timer.html</guid>
      <description>很多时候我们需要用到定时器，比如定期执行一段逻辑。Go语言中用到最多无外乎几种： time.Sleep() time.NewTimer() time.After() time.NewTicker() 这三种底层逻辑都是相通的。具体看网上的介绍。 Sleep和NewTimer 这两个方法类似，你可能会发现NewTimer的实现是放在sleep.go文件当中的。这两种方法都是等待指定的时间长度，只不过sleep直接阻塞执行流，NewTimer是通过发送通道</description>
    </item>
    
    <item>
      <title>HaaS004 | HaaS EDU K1常规测试</title>
      <link>https://chende.ren/2023/02/10005636-004-haaseduk1.html</link>
      <pubDate>Fri, 10 Feb 2023 00:56:36 +0800</pubDate>
      
      <guid>https://chende.ren/2023/02/10005636-004-haaseduk1.html</guid>
      <description>连接WIFI 1 2 3 # 可以用串口连接工具，进入交互模式，调用AliOS Things内置命令netmgr设置 (ash:/data)# netmgr -t wifi -c WIFI_NAME WIFI_PASS</description>
    </item>
    
    <item>
      <title>HaaS003 | 常用工具</title>
      <link>https://chende.ren/2023/02/10003937-003-common-tools.html</link>
      <pubDate>Fri, 10 Feb 2023 00:39:37 +0800</pubDate>
      
      <guid>https://chende.ren/2023/02/10003937-003-common-tools.html</guid>
      <description></description>
    </item>
    
    <item>
      <title>HaaS002 | 物联网开发基础知识</title>
      <link>https://chende.ren/2023/02/10001011-002-iot-techinfo.html</link>
      <pubDate>Fri, 10 Feb 2023 00:10:10 +0800</pubDate>
      
      <guid>https://chende.ren/2023/02/10001011-002-iot-techinfo.html</guid>
      <description>常见外设接口介绍</description>
    </item>
    
    <item>
      <title>HaaS001 | 开发环境搭建</title>
      <link>https://chende.ren/2023/02/09092945-001-install.html</link>
      <pubDate>Thu, 09 Feb 2023 09:29:45 +0800</pubDate>
      
      <guid>https://chende.ren/2023/02/09092945-001-install.html</guid>
      <description>物联网喊了这么多年，真正颠覆式的平台还没有出现。因为物联网应用过于碎片化，智能化的物联网涵盖的东西太多，需要的生态还有些不够完善。国内外云厂商其实早就在布局这个市场，最近更有加速之势；随着ChatGPT的爆火，感觉高阶版的智能物联网时代很快就会到来。 物联网从逻辑架构上一般分为四层，从底向上依次为：感知层、网络层、平台层和应用层。在AIoT</description>
    </item>
    
    <item>
      <title>go-zero（五）| Tracer</title>
      <link>https://chende.ren/2023/01/03175044-005-tracer.html</link>
      <pubDate>Tue, 03 Jan 2023 17:50:44 +0800</pubDate>
      
      <guid>https://chende.ren/2023/01/03175044-005-tracer.html</guid>
      <description>参考： https://www.cnblogs.com/erda/p/16427822.html https://www.dandelioncloud.cn/article/details/1534497725911691266 https://www.cnblogs.com/erda/p/16427822.html (完)</description>
    </item>
    
    <item>
      <title>Go框架 | 微服务治理技巧</title>
      <link>https://chende.ren/2022/11/05104634-001-timeout.html</link>
      <pubDate>Sat, 05 Nov 2022 10:46:34 +0800</pubDate>
      
      <guid>https://chende.ren/2022/11/05104634-001-timeout.html</guid>
      <description>Timeout 不管是客户端调用后端，还是后端处理业务逻辑，都存在超出预期时间的情况，这个时候需要有一定的机制能尽快退出处理并返回结果，防止出现大量等待处理的任务，占用系统资源，影响后续其它请求。 参考： https://zhuanlan.zhihu.com/p/171760129 https://jishuin.proginn.com/p/763bfbd5da5d 过载保护 参考： https://zhuanlan.zhihu.com/p/520699351 http://www.imsdk.cn/news/4372 https://www.jianshu.com/p/d44c5f620fa2 https://mp.weixin.qq.com/s?__biz=MjM5MDE0Mjc4MA==&amp;amp;mid=403476561&amp;amp;idx=1&amp;amp;sn=415b398ed925a41541796c0dd0fe03b7#rd （完）</description>
    </item>
    
    <item>
      <title>Go库003 | 数据库操作</title>
      <link>https://chende.ren/2022/08/23174258-003-database.html</link>
      <pubDate>Tue, 23 Aug 2022 17:42:58 +0800</pubDate>
      
      <guid>https://chende.ren/2022/08/23174258-003-database.html</guid>
      <description>推荐博客文章： 地址： https://www.jianshu.com/p/015aca3e11ae https://www.jianshu.com/p/340eb943be2e https://www.jianshu.com/p/50c9fbf4046c https://www.jianshu.com/p/ee0d2e7bef54 https://www.jianshu.com/p/bc8120bec94e （完）</description>
    </item>
    
    <item>
      <title>Go随笔 | 字符串拼接性能</title>
      <link>https://chende.ren/2022/08/08160951-007-strings-perf.html</link>
      <pubDate>Mon, 08 Aug 2022 16:09:51 +0800</pubDate>
      
      <guid>https://chende.ren/2022/08/08160951-007-strings-perf.html</guid>
      <description>Go中的字符串 Go中的字符串是 UTF-8 字符的一个序列（当字符为 ASCII 码时则占用 1 个字节，其它字符根据需要占用 2-4 个字节）。由于该编码对占用字节长度的不定性，Go 中的字符串里面的字符也可能根据需要占用 1 至 4 个字节，这与其它语言如 C++、Java 或者 Python 不同（Java 始终使用 2 个字节）。Go 这样做的好处是不仅减少了内存和硬盘空间占用，同时也不用其它语言那样</description>
    </item>
    
    <item>
      <title>Go特性 | 语言新变化</title>
      <link>https://chende.ren/2022/07/01144335-001-1.html</link>
      <pubDate>Fri, 01 Jul 2022 14:43:35 +0800</pubDate>
      
      <guid>https://chende.ren/2022/07/01144335-001-1.html</guid>
      <description>go1.20 变化 Free Member 为了提高Go的广泛适用性，给少数极端场景预留更多可发挥的空间。新版Go可以由程序员自己管理内存了。谁申请，谁释放。 当然，目前还没在正式发布版本中支持，需要特殊参数启动选项。参考代码如下： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 import ( &amp;#34;arena&amp;#34; ) type T struct { val int } func main() { a := arena.New() var ptrT *T a.New(&amp;amp;ptrT) ptrT.val = 1 var sliceT []T a.NewSlice(&amp;amp;sliceT, 100) sliceT[99].val = 4 a.Free() } 参考阅读： https://zhuanlan.zhihu.com/p/583572024 String和[]Byt</description>
    </item>
    
    <item>
      <title>系统资源检测工具</title>
      <link>https://chende.ren/2022/05/31150228-sys-tools.html</link>
      <pubDate>Tue, 31 May 2022 15:02:28 +0800</pubDate>
      
      <guid>https://chende.ren/2022/05/31150228-sys-tools.html</guid>
      <description>关键词：CPU性能，磁盘性能，IO性能，服务器性能，吞吐量，性能测试 服务器系统资源的查询，性能测试等经常会需要用到。下面总结一些常用技巧。 sysbench sysbench是一款开源的多线程性能测试工具，可以执行CPU/内存/线程/IO/数据库等方面的性能测试。 1 2 3 4 5 6 # 安装 yum search sysbench yum install -y sysbench # 测试CPU的性能 sysbench cpu --cpu-max-prime=20000 --threads=4 run 下面是Intel(R) Xeon(R) E E-24</description>
    </item>
    
    <item>
      <title>Docker中使用图形化界面</title>
      <link>https://chende.ren/2022/04/27155304-docker-ui.html</link>
      <pubDate>Wed, 27 Apr 2022 15:53:04 +0800</pubDate>
      
      <guid>https://chende.ren/2022/04/27155304-docker-ui.html</guid>
      <description>在一些特殊场景下，我们还是希望在Docker中使用图形化界面的，比如用Docker安装Oracle。大致有两种思路。 第一种：Docker中直接运行图形化桌面 这种方案需要在Docker中安装图形化组件，还需要安装vnc-server。经过各种折腾，我是没弄出来，vncserver报错启动不了。 这种方式即使能成功，安装的东西也太多；不利于Do</description>
    </item>
    
    <item>
      <title>微服务004 | 缓存设计</title>
      <link>https://chende.ren/2022/04/08172659-004-cache.html</link>
      <pubDate>Fri, 08 Apr 2022 17:26:59 +0800</pubDate>
      
      <guid>https://chende.ren/2022/04/08172659-004-cache.html</guid>
      <description>在整个计算机科学中，缓存的概念无处不在。很大程度上是硬件资源成本和收益关系决定的。比如现代CPU都内置了三级缓存，现代计算机常见的硬盘-&amp;gt;高速SSD-&amp;gt;内存等逐级存储介质等。 应用程序如果要处理大量并发请求，没有有效的数据缓存策略，基本上是扛不住的。 缓存雪崩、击穿和穿透 一般我们将数据放入数据库中落地管理（比如MySQL），缓存直</description>
    </item>
    
    <item>
      <title>Go库002 | 常用三方库</title>
      <link>https://chende.ren/2022/03/15194054-002-validator.html</link>
      <pubDate>Tue, 15 Mar 2022 19:40:54 +0800</pubDate>
      
      <guid>https://chende.ren/2022/03/15194054-002-validator.html</guid>
      <description>字段验证 参考说明： https://blog.csdn.net/qq_38038920/article/details/115229039 高性能日志库 zerolog https://developer.aliyun.com/article/1585358 https://blog.csdn.net/slphahaha/article/details/122007836 zap https://learnblockchain.cn/article/9127 https://developer.aliyun.com/article/1585391 slog标准库 https://mp.weixin.qq.com/s/uh0GJxvLVgyRq0J6u9c_2w https://developer.aliyun.com/article/1585400 总结 Go每日一库：https://github.com/darjun/go-daily-lib （完）</description>
    </item>
    
    <item>
      <title>Docker可视化管理工具</title>
      <link>https://chende.ren/2022/02/25140619-dk-manage-tools.html</link>
      <pubDate>Fri, 25 Feb 2022 14:06:19 +0800</pubDate>
      
      <guid>https://chende.ren/2022/02/25140619-dk-manage-tools.html</guid>
      <description>Docker大行其道，在运维端给我们带来了前所未有的便利和高效，同时又具备很好的隔离性和安全性。一般我们都是远程服务器shell环境管理docker，如果管理的服务器多了，你肯定会觉得很繁琐，此时可视化管理工具将会极大提供管理效率。 这样的管理工具很多，这里重点介绍一款轻量级管理工具Portainer。他可以管理本机单台服务器，也可以批量管</description>
    </item>
    
    <item>
      <title>MySQL002 | 性能优化</title>
      <link>https://chende.ren/2022/01/11152853-002-inndb-config.html</link>
      <pubDate>Tue, 11 Jan 2022 15:28:53 +0800</pubDate>
      
      <guid>https://chende.ren/2022/01/11152853-002-inndb-config.html</guid>
      <description>数据库事务 事务的四个特性（ACID） 一般来说，衡量事务必须满足四个特性：ACID，即 原子性（Atomicity，或称不可分割性）、一致性（Consistency）、隔离性（Isolation，又称独立性）、持久性（Durability）。 原子性（Atomicity）：一个事务（transaction）中的所有操作，要么全部完成，要么全部不</description>
    </item>
    
    <item>
      <title>Go库001 | sync.Pool &amp; sync.Map</title>
      <link>https://chende.ren/2021/12/24135652-001-sync-pool.html</link>
      <pubDate>Fri, 24 Dec 2021 13:56:52 +0800</pubDate>
      
      <guid>https://chende.ren/2021/12/24135652-001-sync-pool.html</guid>
      <description>标准库sync包中，内置了一些实用的数据结构，而且保证线程安全。比如：Mutex、RWMutex、WaitGroup、Once 、Cond、Map、Pool 。 参考阅读： https://zhuanlan.zhihu.com/p/138214620 sync.Pool Go自带了很多实用的标准库，其中sync.Pool就是用于提高内存使用效率的缓存库，而且是协程安全的。这个库被广泛使用，但是如果没有搞懂其原理，很可能存在乱用错用的情况。</description>
    </item>
    
    <item>
      <title>Redis001 | 常用操作手册</title>
      <link>https://chende.ren/2021/12/09153738-001-handler.html</link>
      <pubDate>Thu, 09 Dec 2021 15:37:38 +0800</pubDate>
      
      <guid>https://chende.ren/2021/12/09153738-001-handler.html</guid>
      <description>OS Shell下批量操作Redis 1 2 3 4 5 6 7 # 批量删除库中的某些Key ./redis-cli -h ip -p 1001 -a xxx keys ip_* |xargs ./redis-cli -h ip -p 1001 -a xxx del ./redis-cli -h ip -p 1001 -a xxx keys &amp;#34;*ip_*&amp;#34;|xargs ./redis-cli -h ip -p 1001 -a xxx del ./redis-cli -h ip -p 1001 -a xxx keys &amp;#34;*ip_*&amp;#34;|xargs -r -t -n1 ./redis-cli -h ip -p 1001 -a xxx del # key 如果带空格，需要用这里的语句才能批量删除 ./redis-cli -h ip -p 1001 -a xxx keys &amp;#34;*ip_*&amp;#34;|xargs -I {} ./redis-cli -h ip -p 1001 -a xxx del &amp;#34;{}&amp;#34; Redis Lua脚本批量删除 1 2 3 4 5 6 7 8 -- 第一种key太多可能删除不了，第二种</description>
    </item>
    
    <item>
      <title>微服务003 | 熔断降级限流排队</title>
      <link>https://chende.ren/2021/11/26165043-003-breaker-ha.html</link>
      <pubDate>Fri, 26 Nov 2021 16:50:43 +0800</pubDate>
      
      <guid>https://chende.ren/2021/11/26165043-003-breaker-ha.html</guid>
      <description>微服务保护机制 熔断降级机制是对系统的防护，比如受到一些恶意攻击，那么需要熔断机制来保护系统的微服务，做出响应，避免资源被耗尽。既要能响应，又要能防护，当我们的请求达到一个负载阈值，就启用熔断，把真实接口关掉，给客户端请求一个响应，这个响应，我们可以设置。服务熔断就是对该服务的调用执行熔断，对应后续请求，不在继续调用该目标服务，而是直接返回</description>
    </item>
    
    <item>
      <title>Go随笔 | 内存占用过多对性能的影响</title>
      <link>https://chende.ren/2021/11/03193304-006-mem-speed.html</link>
      <pubDate>Wed, 03 Nov 2021 19:33:04 +0800</pubDate>
      
      <guid>https://chende.ren/2021/11/03193304-006-mem-speed.html</guid>
      <description>现代CPU一般具有三级缓存，目的是追求性价比。CPU在存取内存的时候存在缓存命中的问题，因此一般内存占用少的程序有更高的缓存命中率，一般性能会更好，但是内存占用的大小究竟对程序性能有多大影响呢？今天我们用WEB框架中常见数据结构的设计来分析一下性能。 Web框架中间件设计 在Web框架中常见的路由数据结构都是数，每个叶子节点代表一条路由，节点</description>
    </item>
    
    <item>
      <title>Go框架 | Go框架中间件实现方式</title>
      <link>https://chende.ren/2021/10/26185025-006-web-freamwork.html</link>
      <pubDate>Tue, 26 Oct 2021 18:50:25 +0800</pubDate>
      
      <guid>https://chende.ren/2021/10/26185025-006-web-freamwork.html</guid>
      <description>为了更好的实现GoFast，我看了很多Golang的Web框架，包括比较流行的：Gin、Echo、iris、go-zero等。他们关于中间件的实现有很多相似的地方，但也有特色的地方，这里我们就重点分析一下他们的实现，顺便说说我的看法，最后介绍一下GoFast的实现。 Gin构造中间件数组 Gin框架是对每个路由节点单独构建一个中间件切片，请求</description>
    </item>
    
    <item>
      <title>微服务002 | 限流算法</title>
      <link>https://chende.ren/2021/10/21130340-ms-rate-limit.html</link>
      <pubDate>Thu, 21 Oct 2021 13:03:40 +0800</pubDate>
      
      <guid>https://chende.ren/2021/10/21130340-ms-rate-limit.html</guid>
      <description>应用为什么要限流 由于 API 接口无法控制调用方的行为，因此当遇到瞬时请求量激增时，会导致接口占用过多服务器资源，使得其他请求响应速度降低或是超时，更有甚者可能导致服务器宕机。限流(Ratelimiting)指对应用服务的请求进行限制，例如某一接口的请求限制为 100 个每秒，对超过限制的请求则进行快速失败或丢弃。 限流可以应对： 热点业务带来的突发请求； 调</description>
    </item>
    
    <item>
      <title>Go随笔 | 协程为什么比线程轻量</title>
      <link>https://chende.ren/2021/10/12151539-go-thread-gmp.html</link>
      <pubDate>Tue, 12 Oct 2021 15:15:39 +0800</pubDate>
      
      <guid>https://chende.ren/2021/10/12151539-go-thread-gmp.html</guid>
      <description>Golang中GMP的介绍参考：/2020/12/27221039-008-gmp-model.html 操作系统会在物理处理器上调度线程来运行，而Go语言的运行时会在逻辑处理器P上调度goroutine来运行。每个逻辑处理器都分别绑定到单个操作系统线程M。在1.5版本以后，Go语言的运行时默认会为每个可用的物理处理器分配一个逻辑处理器。这</description>
    </item>
    
    <item>
      <title>OS001 | 系统调用</title>
      <link>https://chende.ren/2021/09/29191908-001-system-call.html</link>
      <pubDate>Wed, 29 Sep 2021 19:19:08 +0800</pubDate>
      
      <guid>https://chende.ren/2021/09/29191908-001-system-call.html</guid>
      <description>参考： https://www.cnblogs.com/mjc-blog/p/12037308.html （完）</description>
    </item>
    
    <item>
      <title>MySQL常见问题</title>
      <link>https://chende.ren/2021/09/18104600-backup-qa.html</link>
      <pubDate>Sat, 18 Sep 2021 10:46:00 +0800</pubDate>
      
      <guid>https://chende.ren/2021/09/18104600-backup-qa.html</guid>
      <description>mysqldump 1 2 3 # 备份单张表，同时启用gzip压缩 mysqldump -uroot -pdb191@b.x fund_trade account_share_logs | gzip &amp;gt; \ 191_dump_20210918_104401.fund_trade.account_share_logs.sql.gz 定时任务备份crontab： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/bin/bash #33 02 * * * sh /home/mysql_bak_191.sh &amp;gt;&amp;gt; /home/bak_mysql_191.log 2&amp;gt;&amp;amp;1 bk_datetime=`date +%Y%m%d_%H%M%S` back_path=/home/bmc/databases/auto_back mysqldump -uroot -pxxxxxx | gzip &amp;gt; $back_path/dump.$bk_datetime.dxhj_oa.sql.gz tar -czvPf - $back_path/dump.$bk_datetime.* |openssl des3 -salt -k passwd |dd of= \ $back_path/191_dump_$bk_datetime.mysql.des3 rm -rf $back_path/dump.$bk_datetime.* scp -P 22334 $back_path/191_dump_$bk_datetime.mysql.des3 root@x.x.x.x:/backup 查询用户所有权限 1 2 3 -- 查询到用户对应访问IP的权限记录，然后针对每条user@ip记录查询权限 select * from mysql.user; show grants for &amp;#39;user-name&amp;#39;@&amp;#39;host&amp;#39; 表被锁定 1 2 -- 查询系统库</description>
    </item>
    
    <item>
      <title>Go随笔 | 编译技巧和协程堆栈</title>
      <link>https://chende.ren/2021/08/31125739-go-build.html</link>
      <pubDate>Tue, 31 Aug 2021 12:57:39 +0800</pubDate>
      
      <guid>https://chende.ren/2021/08/31125739-go-build.html</guid>
      <description>交叉编译 交叉编译主要是两个编译环境参数 $GOOS 和 $GOARCH 的设定。$GOOS代表编译的目标系统，$GOARCH代表编译的处理器体系结构。 $GOOS可选值如下： 1 2 3 4 5 6 7 8 9 darwin dragonfly freebsd linux netbsd openbsd plan9 solaris windows $GOARCH可选值如下： 1 2 3 386 amd64 arm 选择性编译 虽然Go可以跨平台编译，但却无法解决所有系统的差异性；尤其直接调用操作系统函数的时候。相同功能编写类似xxx_w</description>
    </item>
    
    <item>
      <title>网络编程002 | Linux内核epoll原理学习</title>
      <link>https://chende.ren/2021/08/26215703-002-epoll-study.html</link>
      <pubDate>Thu, 26 Aug 2021 21:57:03 +0800</pubDate>
      
      <guid>https://chende.ren/2021/08/26215703-002-epoll-study.html</guid>
      <description>现代计算机系统叫做程序存储式计算机，抽象点说计算机系统就只有两种部件：CPU + IO设备，IO设备又分为内设和外设，内设指的就是内存、硬盘、网卡等，外设的种类就更多了，诸如鼠标键盘、移动硬盘、显示器等等都是。IO设备和CPU之间的数据交互都要通过操作系统来调度的， epoll就是Linux系统内核高效处理IO事件的一种实现，是Linux下多路</description>
    </item>
    
    <item>
      <title>Go总结（二二）| panic异常处理</title>
      <link>https://chende.ren/2021/08/19185357-022-panic.html</link>
      <pubDate>Thu, 19 Aug 2021 18:53:57 +0800</pubDate>
      
      <guid>https://chende.ren/2021/08/19185357-022-panic.html</guid>
      <description>error和panic 错误 和 异常 是两个不同的概念，非常容易混淆。很多程序员习惯将一切非正常情况都看做错误，而不区分错误和异常，即使程序中可能有异常抛出，也将异常及时捕获并转换成错误。 但事实并非如此就好。众所周知，Golang 遵循“少即是多”的设计哲学，追求简洁优雅，就是说如果异常价值不大，就不会将异常加入到语言特性中。 错误指的是可能出现问</description>
    </item>
    
    <item>
      <title>网络编程001 | 三次握手与四次挥手</title>
      <link>https://chende.ren/2021/08/11142249-001-net-program.html</link>
      <pubDate>Wed, 11 Aug 2021 14:22:49 +0800</pubDate>
      
      <guid>https://chende.ren/2021/08/11142249-001-net-program.html</guid>
      <description>学习了计算机网络的相关知识，下面我们来从网络编程的角度验证一下网络实际交互的数据是什么。下面的程序用C语言在Linux环境下编写而成。 先准备一个服务器端程序，任何连上它的客户端，它都给返回服务器当前时间，然后立刻主动关闭连接。 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 26 27 #include &amp;#34;unp.h&amp;#34;#include &amp;lt;time.h&amp;gt; int main(int argc, char** argv) { int listenfd, connfd; struct sockaddr_in servaddr; char buff[MAXLINE]; time_t ticks; listenfd = Socket(AF_INET, SOCK_STREAM, 0); bzero(&amp;amp;servaddr, sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_addr.s_addr</description>
    </item>
    
    <item>
      <title>网络008 | 运输层</title>
      <link>https://chende.ren/2021/08/05100554-008-tcp-udp.html</link>
      <pubDate>Thu, 05 Aug 2021 10:05:54 +0800</pubDate>
      
      <guid>https://chende.ren/2021/08/05100554-008-tcp-udp.html</guid>
      <description>实际上在计算机网络中进行通信的真正实体是位于通信两端主机中的进程。如何为运行在不同主机上的应用进程提供直接的通信服务是运输层的任务，运输层协议又称为端到端协议。 （1）运输层为相互通信的应用进程提供逻辑通信。 （2）运输层的复用与端口的概念。 （3）无连接的UDP的特点。 （4）面向连接的TCP实现可靠传输的工作原理，以及TCP的滑动窗口、流量控</description>
    </item>
    
    <item>
      <title>网络007 | 网络层3</title>
      <link>https://chende.ren/2021/08/04100554-007-ip3.html</link>
      <pubDate>Wed, 04 Aug 2021 10:05:54 +0800</pubDate>
      
      <guid>https://chende.ren/2021/08/04100554-007-ip3.html</guid>
      <description>移动IP 现在有成千上万的人在移动中使用计算机进行通信，如坐在火车或汽车内使用无线设备上网浏览网页、收发电子邮件或使用最近甚为流行的微信进行网上社交等。 移动性对网络应用的影响 如果你乘坐在一辆行驶的汽车上，汽车正穿越于遍布Wi-Fi服务区的城市街道，从一个网络不间断地进入另一个网络，而这时你正在下载一个大的 DVD 视频文件，如果你的计算机在不停地变</description>
    </item>
    
    <item>
      <title>网络006 | 网络层2</title>
      <link>https://chende.ren/2021/07/23192327-006-ip2.html</link>
      <pubDate>Fri, 23 Jul 2021 19:23:27 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/23192327-006-ip2.html</guid>
      <description>网际控制报文协议ICMP 为了更有效地转发IP数据报和提高交付成功的机会，在网际层使用了网际控制报文协议（Internet Control Message Protocol，ICMP）。ICMP 允许主机或路由器报告差错情况和提供有关异常情况的报告。ICMP 报文作为IP层数据报的数据，加上数据报的首部，组成 IP 数据报发送出去。但通常我们把ICMP作为IP层的协议，而不是高层</description>
    </item>
    
    <item>
      <title>网络005 | 网络层1</title>
      <link>https://chende.ren/2021/07/23192232-005-ip.html</link>
      <pubDate>Fri, 23 Jul 2021 19:22:32 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/23192232-005-ip.html</guid>
      <description>网络层关注的是如何将分组从源主机沿着网络路径送达目的主机。为了将分组送达目的主机，有可能沿路要经过许多跳（hop）中间路由器。为此，网络层必须知道整个网络的拓扑结构，并且在拓扑结构中选择适当的转发路径。同时，网络层还必须仔细地选择路由器，以避免发生某些通信链路或路由器负载过重，而其他链路和路由器空闲的情况。因此，网络中的每台主机和路由器都</description>
    </item>
    
    <item>
      <title>网络004 | 数据链路层2</title>
      <link>https://chende.ren/2021/07/22150610-004-link2.html</link>
      <pubDate>Thu, 22 Jul 2021 15:06:10 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/22150610-004-link2.html</guid>
      <description>使用广播信道的数据链路层 广播信道可以进行一对多的通信，因此曾经被广泛应用于局域网之中。使用广播信道的局域网被称为共享式局域网。 虽然随着技术的发展，交换技术的成熟和成本的降低，具有更高性能的使用点对点链路和链路层交换机的交换式局域网在有线领域已完全取代了共享式局域网，但由于无线信道的广播天性，无线局域网仍然使用的是共享媒体技术。 媒体接入控制</description>
    </item>
    
    <item>
      <title>网络003 | 数据链路层1</title>
      <link>https://chende.ren/2021/07/21105059-003-link.html</link>
      <pubDate>Wed, 21 Jul 2021 10:50:59 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/21105059-003-link.html</guid>
      <description>数据链路层使用的信道主要有以下两种： 点对点信道。这种信道使用一对一的点对点通信方式。 广播信道。这种信道使用一对多的广播通信方式。 参考：https://wenku.baidu.com/view/8084205aa22d7375a417866fb84ae45c3a35c243.html 点对点信道的数据链路层 数据链路和帧 数据链路（data lin</description>
    </item>
    
    <item>
      <title>网络002 | 物理层</title>
      <link>https://chende.ren/2021/07/21105028-002-physical.html</link>
      <pubDate>Wed, 21 Jul 2021 10:50:28 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/21105028-002-physical.html</guid>
      <description>首先强调，物理层考虑的是怎样才能在连接各种计算机的传输媒体上传输数据比特流，而不是指具体的传输媒体。 物理层协议的主要任务就是确定与传输媒体的接口有关的一些特性： 机械特性 指明接口所用接线器的形状和尺寸、引脚数目和排列、固定和锁定装置等。 电气特性 指明在接口电缆的各条线上出现的电压的范围。 功能特性 指明某条线上出现的某一电平的电压表示何种意义。 过</description>
    </item>
    
    <item>
      <title>网络001 | 概览</title>
      <link>https://chende.ren/2021/07/21095744-001-network-intr.html</link>
      <pubDate>Wed, 21 Jul 2021 09:57:44 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/21095744-001-network-intr.html</guid>
      <description>本系列学习笔记只关注重点知识的归纳总结。绝大部分内容来自一本教材《计算机网络教程》谢钧、谢希仁编著。 ISP 从 1993年开始，由美国政府资助的 NSFNET 逐渐被若干个商用的因特网主干网替代，而政府机构不再负责因特网的运营，而是让各种 ISP 来运营。ISP 又常译为因特网服务提供商。 ISP可以从因特网管理机构申请到成块的IP地址，同时拥有通信线路（大的ISP自己建</description>
    </item>
    
    <item>
      <title>监控主机上的Docker</title>
      <link>https://chende.ren/2021/07/19193644-docker.html</link>
      <pubDate>Mon, 19 Jul 2021 19:36:44 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/19193644-docker.html</guid>
      <description>lazydocker lazydocker是一个TUI应用程序，可以帮助您在一个地方管理和监控所有的Docker容器。 安装：直接下载编译好的版本即可：https://github.com/jesseduffield/lazydocker 之后直接运行。 使用非常简单，下面看一些常用快捷键： Tab切换分类区域 ‘[’ 或 ‘]’ 切换 Tab页 PgUp，PgDn可以上下滚动</description>
    </item>
    
    <item>
      <title>Tcpdump简介</title>
      <link>https://chende.ren/2021/07/16120748-tcpdump.html</link>
      <pubDate>Fri, 16 Jul 2021 12:07:48 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/16120748-tcpdump.html</guid>
      <description>参考： https://www.cnblogs.com/chenpingzhao/p/9108570.html https://www.cnblogs.com/klvchen/p/11763710.html （完）</description>
    </item>
    
    <item>
      <title>Docker容器网络互联</title>
      <link>https://chende.ren/2021/07/14113656-docker-net.html</link>
      <pubDate>Wed, 14 Jul 2021 11:36:56 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/14113656-docker-net.html</guid>
      <description>我的试验环境说明：centos8.4 + Docker version 20.10.7, build f0df350 如何让容器之间能互相通信呢？答案就是《容器互联》。 参考： https://www.cnblogs.com/kevingrace/p/6590319.html https://www.cnblogs.com/bakari/p/9036984.html Docker单主机容器通信 基于对net namespace的控制，docker可以为在容器创建隔离的网络环境，在隔离的网络环境下，容器具有完全独立的网络栈，与宿主机隔离，也可以使容器共享主机或者其他容器的网络命名空间，基本可以满足开发</description>
    </item>
    
    <item>
      <title>Linux中虚拟网桥</title>
      <link>https://chende.ren/2021/07/13112431-net-bridge.html</link>
      <pubDate>Tue, 13 Jul 2021 11:24:31 +0800</pubDate>
      
      <guid>https://chende.ren/2021/07/13112431-net-bridge.html</guid>
      <description>今天我们就来聊一聊如何用Linux命令创建虚拟网卡，在学习命令之前，我们先了解一下Linux比较重要的2个模式：TUN和TAP。 在计算机网络中，TUN与TAP是操作系统内核中的虚拟网络设备。不同于普通靠硬件网络板卡实现的设备，这些虚拟的网络设备全部用软件实现，并向运行于操作系统上的软件提供与硬件的网络设备完全相同的功能。 TAP等同于一个以</description>
    </item>
    
    <item>
      <title>Go总结（二一）| JSON编解码</title>
      <link>https://chende.ren/2021/06/23140319-020-runtime.html</link>
      <pubDate>Wed, 23 Jun 2021 14:03:19 +0800</pubDate>
      
      <guid>https://chende.ren/2021/06/23140319-020-runtime.html</guid>
      <description>现在的Web应用，几乎都是采用JSON格式进行数据交互。 Go语言内建对JSON的支持。使用Go语言内置的encoding/json标准库，开发者可以轻松使用Go程序生成和解析JSON格式的数据。在Go语言实现JSON的编码和解码时，遵循RFC4627协议标准。深入理解Go是如何编码解码JSON格式数据非常有必要。 JSON规范 JSON规范，</description>
    </item>
    
    <item>
      <title>Docker常见问题汇总</title>
      <link>https://chende.ren/2021/06/17020156-docker-qa.html</link>
      <pubDate>Thu, 17 Jun 2021 02:01:56 +0800</pubDate>
      
      <guid>https://chende.ren/2021/06/17020156-docker-qa.html</guid>
      <description>有些问题参考： https://www.cnblogs.com/adolfmc/p/12589283.html Crontab不执行 1 2 3 4 5 6 7 8 9 10 11 12 13 yum install -y cronie # systemctl status crond.service # 安装rsyslog yum install -y rsyslog 或者 yum install -y syslog-ng # 修改/etc/pam.d/cron # 注释掉 session required pam_loginuid.so # 重启 crontab systemctl restart crond.service 容器配置如何修改 大家可以用docker inspect ctos83.162命令来查看配置信息。这里的配置信息是可以更改的，比如我们的容器/home/dockerRoot/c</description>
    </item>
    
    <item>
      <title>Linux服务器时间语言字符集</title>
      <link>https://chende.ren/2021/05/10181354-ntp-time.html</link>
      <pubDate>Mon, 10 May 2021 18:13:54 +0800</pubDate>
      
      <guid>https://chende.ren/2021/05/10181354-ntp-time.html</guid>
      <description>SUSE自动同步时间 服务器每天定时同步时间一次： 1 52 03 * * * /usr/sbin/ntpdate 10.x.x.x 10.10.x.x; /sbin/hwclock -w 可以配置自己局域网的服务器作为时间服务器，安装ntpdate工具，然后服务器配置如下： 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 26 27 28 29 30 31 32 33 34 35 36 ################################################################################ ## /etc/ntp.conf ## ## Sample NTP configuration file. ## See package &amp;#39;ntp-doc&amp;#39; for documentation, Mini-HOWTO and FAQ. ## Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany. ## ## Author: Michael Andres, &amp;lt;ma@suse.de&amp;gt; ## Michael Skibbe, &amp;lt;mskibbe@suse.de&amp;gt; ## ################################################################################ server 127.127.1.0 # local clock (LCL) fudge 127.127.1.0 stratum 10 # LCL is unsynchronized # By default, exchange</description>
    </item>
    
    <item>
      <title>K8s008 | Master高可用部署</title>
      <link>https://chende.ren/2021/04/26194955-k8s-config-ha.html</link>
      <pubDate>Mon, 26 Apr 2021 19:49:55 +0800</pubDate>
      
      <guid>https://chende.ren/2021/04/26194955-k8s-config-ha.html</guid>
      <description>K8s高可用部署至少需要2台Master主机，为此我们复用上次做etcd集群的4台机器，2台做Master，2台做Worker。也就是说要完成k8s集群的部署，先完成etcd集群的独立部署工作。 参考以前的文章： /2020/12/09121959-k8s-config.html /2021/04/23183930-k8s-etcd.html 环境准备 我们用4台centos8.3虚拟机来做配置试验，每台服务都做下面的配置： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23</description>
    </item>
    
    <item>
      <title>K8s007 | etcd高可用部署</title>
      <link>https://chende.ren/2021/04/23183930-k8s-etcd.html</link>
      <pubDate>Fri, 23 Apr 2021 18:39:30 +0800</pubDate>
      
      <guid>https://chende.ren/2021/04/23183930-k8s-etcd.html</guid>
      <description>etcd是近些年比较流行的分布式键值对存储系统，他采用Go语言编写而成，常被用于微服务中的服务注册与发现。 K8s高可用架构图 K8s系统默认就采用etcd存储数据，看看下面比较常见的高可用部署方案： 以上两种方案的区别是：一种用docker方式部署etcd，一种是独立部署etcd（官方更推荐用这种独立部署的方式）。 etcd的工作原理 etcd是</description>
    </item>
    
    <item>
      <title>Linux下route命令</title>
      <link>https://chende.ren/2021/04/02173130-route-n.html</link>
      <pubDate>Fri, 02 Apr 2021 17:31:30 +0800</pubDate>
      
      <guid>https://chende.ren/2021/04/02173130-route-n.html</guid>
      <description>Linux系统的route命令用于显示和操作IP路由表，要实现两个不同的子网之间的通信，需要一台连接两个网络的路由器，或者同时位于两个网络的网关来实现。 执行方式一般用：route -n -n 表示不解析名字,列出速度会比route 快 下面我找个一个部署openvpn server的服务器路由表来说明一下 route命令输出的路由表字段含义： 字段 说明 Destination 目标</description>
    </item>
    
    <item>
      <title>Docker挂载主机磁盘空间</title>
      <link>https://chende.ren/2021/04/01191643-docker-file.html</link>
      <pubDate>Thu, 01 Apr 2021 19:16:43 +0800</pubDate>
      
      <guid>https://chende.ren/2021/04/01191643-docker-file.html</guid>
      <description>默认情况下，在容器内创建的文件，都会保存在容器基于镜像之上的一个可读写层。但是，这一层是依赖于容器而存在的，当容器不存在时，这些数据也就不存在了。而且这些数据紧紧的耦合在容器内部，很难将这些数据导出。另一点，对容器的这一层进行写操作，需要额外的系统支持，相比挂载卷这种直接写主机文件系统效率要更低。 如何将主机的文件目录映射到Docker容器</description>
    </item>
    
    <item>
      <title>Docker容器配置固定IP</title>
      <link>https://chende.ren/2021/03/27003448-docker-ip.html</link>
      <pubDate>Sat, 27 Mar 2021 00:34:48 +0800</pubDate>
      
      <guid>https://chende.ren/2021/03/27003448-docker-ip.html</guid>
      <description>有些时候我们希望新创建的容器有我们指定的固定IP地址，这样和其它容器或者宿主机能很好的通信，部署应用程序也会方便很多。实现这种部署一般使用桥接方式来处理，这样每个容器都相当于暴露在内网上的一台实体机，都不需要和宿主机做端口映射了，通过内网直接就能访问容器内的应用。 我的试验环境说明：openSUSE42.3 + Docker version 18.09.1, build 4c52b901c6cb 尝试分配固定IP 比如我</description>
    </item>
    
    <item>
      <title>001 | ClickHouse简介</title>
      <link>https://chende.ren/2021/03/24141230-001-intr.html</link>
      <pubDate>Wed, 24 Mar 2021 14:12:30 +0800</pubDate>
      
      <guid>https://chende.ren/2021/03/24141230-001-intr.html</guid>
      <description>ClickHouse是一个用于联机分析(OLAP)的列式数据库管理系统(DBMS)。 ClickHouse 是 Yandex（俄罗斯最大的搜索引擎）开源的一个用于实时数据分析的基于列存储的数据库，其处理数据的速度比传统方法快 100-1000 倍。它的性能超过了目前市场上可比的面向列的DBMS，每台服务器每秒处理数亿至十亿多行和数十千兆字节的数据。 ClickHouse OLAP 适用场景有：1）读多于写；2</description>
    </item>
    
    <item>
      <title>HTTP相关协议简介</title>
      <link>https://chende.ren/2021/03/20010711-http-all.html</link>
      <pubDate>Sat, 20 Mar 2021 01:07:11 +0800</pubDate>
      
      <guid>https://chende.ren/2021/03/20010711-http-all.html</guid>
      <description>常见HTTP相关协议 http：目前绝大多数是http1.1版本，最原始的web协议，默认80端口，基于TCP协议。 https：加密的http协议，默认443端口，基于TCP协议。 http2：第二代http协议，相较于HTTP1.x，大幅度的提升了web性能。在与HTTP/1.1完全语义兼容的基础上，进一步减少了网络延迟和传输的安全性，基于</description>
    </item>
    
    <item>
      <title>算法001 | 常见数据结构和算法</title>
      <link>https://chende.ren/2021/02/28222246-hmac-lang.html</link>
      <pubDate>Sun, 28 Feb 2021 22:22:46 +0800</pubDate>
      
      <guid>https://chende.ren/2021/02/28222246-hmac-lang.html</guid>
      <description>更多算法汇总网站参考： 博哥玩算法：https://wansuanfa.com/ 散列算法 不同编程语言实现的常见散列算法： https://github.com/danharper/hmac-examples 二叉树 经过排序后的二叉查找树在动态插入、删除节点时表现出远优于线性链表的性能，使其非常适合于查找的数据结构。但这个数据结构存在一个最大的问题就是在最坏的情况下，有可能退化成一个链表。为了解决这个问题，便诞生很多二叉树变种</description>
    </item>
    
    <item>
      <title>微服务001 | 鉴权方案</title>
      <link>https://chende.ren/2021/02/24102427-ms-auth.html</link>
      <pubDate>Wed, 24 Feb 2021 10:24:27 +0800</pubDate>
      
      <guid>https://chende.ren/2021/02/24102427-ms-auth.html</guid>
      <description>从单体应用架构到分布式应用架构再到微服务架构，应用的安全访问在不断的经受考验。为了适应架构的变化、需求的变化，身份认证与鉴权方案也在不断的变革。面对数十个甚至上百个微服务之间的调用，如何保证高效安全的身份认证？面对外部的服务访问，该如何提供细粒度的鉴权方案？ 四种鉴权方案 David Borsos 在伦敦的微服务大会上提出了四种方案，整理如下： 单点登录（SSO） 这</description>
    </item>
    
    <item>
      <title>JWT和Oauth2权限认证方式</title>
      <link>https://chende.ren/2021/02/23124830-jwt-oauth2.html</link>
      <pubDate>Tue, 23 Feb 2021 12:48:30 +0800</pubDate>
      
      <guid>https://chende.ren/2021/02/23124830-jwt-oauth2.html</guid>
      <description>快速认识JWT 根据维基百科的定义，JSON WEB Token（JWT，读作 [/dʒɒt/]），是一种基于JSON的、用于在网络上声明某种主张的令牌（token）。JWT通常由三部分组成: 头信息（header）, 消息体（payload）和签名（signature）。 第一部分头信息指定了该JWT使用的签名算法，HS256 表示使用了 HMAC-SHA256 来生成签名： header =</description>
    </item>
    
    <item>
      <title>POST提交数据</title>
      <link>https://chende.ren/2021/02/21232434-http-post.html</link>
      <pubDate>Sun, 21 Feb 2021 23:24:34 +0800</pubDate>
      
      <guid>https://chende.ren/2021/02/21232434-http-post.html</guid>
      <description>HTTP/1.1 协议约定的常见请求Method有 GET、HEAD、POST、PUT、PATCH、DELETE、CONNECT、OPTIONS、TRACE这几种。看看Go源代码中的常量定义： 1 2 3 4 5 6 7 8 9 10 11 12 13 // Common HTTP methods. // Unless otherwise noted, these are defined in RFC 7231 section 4.3. const ( MethodGet = &amp;#34;GET&amp;#34; MethodHead = &amp;#34;HEAD&amp;#34; MethodPost = &amp;#34;POST&amp;#34; MethodPut = &amp;#34;PUT&amp;#34; MethodPatch = &amp;#34;PATCH&amp;#34; // RFC 5789 MethodDelete = &amp;#34;DELETE&amp;#34; MethodConnect = &amp;#34;CONNECT&amp;#34; MethodOptions = &amp;#34;OPTIONS&amp;#34; MethodTrace = &amp;#34;TRACE&amp;#34; ) 我们一般都使用POST 来向服务端提交数据，</description>
    </item>
    
    <item>
      <title>Go随笔 | 函数递归调用性能分析</title>
      <link>https://chende.ren/2021/02/09113306-call-stack.html</link>
      <pubDate>Tue, 09 Feb 2021 11:33:06 +0800</pubDate>
      
      <guid>https://chende.ren/2021/02/09113306-call-stack.html</guid>
      <description>今天说说递归和循环调用的性能比较。 递归的优点是简化程序设计，结构简洁清晰，容易编程，可读性强，容易理解。在很多情况下使用递归是必要的，它往往能把复杂问题分解为更简单的步骤，而且能够反映问题的本质。又比如汉诺塔，用递归的话基本上可以理解，但是如果不用递归而用循环的话，程序根本不知道从何处着手！ 但是递归的缺点也很明显：速度慢，运行效率低，对存</description>
    </item>
    
    <item>
      <title>Go总结（二十）| 强大的runtime包</title>
      <link>https://chende.ren/2021/02/05003628-020-runtime.html</link>
      <pubDate>Fri, 05 Feb 2021 00:36:28 +0800</pubDate>
      
      <guid>https://chende.ren/2021/02/05003628-020-runtime.html</guid>
      <description>runtime包提供了运行时与系统的交互，比如控制协程函数，触发垃圾立即回收等等底层操作，下面我们就运行时能做的所有事情逐个进行说明： 1.获取GOROOT环境变量 2.获取GO的版本号 3.获取本机CPU个数 4.设置最大可同时执行的最大CPU数 5.设置cup profile 记录的速录 6.查看cup profile 下一次堆栈跟踪数据 7.立即执行一次垃圾回收 8.给变量绑定方</description>
    </item>
    
    <item>
      <title>go-zero（四）| zRPC拦截器</title>
      <link>https://chende.ren/2021/02/04003916-004-zrpc-interceptor.html</link>
      <pubDate>Thu, 04 Feb 2021 00:39:16 +0800</pubDate>
      
      <guid>https://chende.ren/2021/02/04003916-004-zrpc-interceptor.html</guid>
      <description>zRPC是经过生产环境千万日活实践检验的通用RPC框架，其底层依赖gRPC，内置完整的微服务治理能力。是一款简单、通用、高性能、可扩展的RPC框架。 框架特点 通用性：依赖gRPC，支持跨语言的调用 高性能：底层依赖HTTP2协议，序列化采用Protobuf序列化，保证了高性能 可扩展：用户可根据不同的业务特点扩展功能如自定义拦截器等等 功能完整：</description>
    </item>
    
    <item>
      <title>Go总结（十九）| 并发控制Context简介</title>
      <link>https://chende.ren/2021/02/03134151-019-context.html</link>
      <pubDate>Wed, 03 Feb 2021 13:41:51 +0800</pubDate>
      
      <guid>https://chende.ren/2021/02/03134151-019-context.html</guid>
      <description>控制并发有两种经典的方式，一种是WaitGroup，另外一种就是Context。 WaitGroup 直接看例子： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 func main() { var wg sync.WaitGroup wg.Add(2) go func() { time.Sleep(2 * time.Second) fmt.Println(&amp;#34;1号完成&amp;#34;) wg.Done() }() go func() { time.Sleep(2 * time.Second) fmt.Println(&amp;#34;2号完成&amp;#34;) wg.Done() }() wg.Wait() fmt.Println(&amp;#34;好了，大家都干完了，收</description>
    </item>
    
    <item>
      <title>日志处理套件ELK</title>
      <link>https://chende.ren/2021/01/31232909-elk.html</link>
      <pubDate>Sun, 31 Jan 2021 23:29:09 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/31232909-elk.html</guid>
      <description>今天介绍微服务架构中的日志收集方案 ELK（ELK 是 Elasticsearch、Logstash、Kibana 的简称），准确的说是 ELKB，即 ELK + Filebeat，其中 Filebeat 是用于转发和集中日志数据的轻量级传送工具。 ELK虽然也可以用在很多其它领域，但典型的用法就是收集分析处理日志的组合工具。 日志系统 在以前的项目中，如果想要在生产环境需要通过日</description>
    </item>
    
    <item>
      <title>Prometheus&#43;Grafana</title>
      <link>https://chende.ren/2021/01/31153538-prometheus-grafana.html</link>
      <pubDate>Sun, 31 Jan 2021 15:35:38 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/31153538-prometheus-grafana.html</guid>
      <description>今天介绍Prometheus+Grafana打造高逼格监控平台。看看如何使用Grafana和Prometheus以及node_exporter对Linux服务器性能进行监控。 其实很早的时候我自己就写过一套这样的系统：n-sentinel 。主要是用Node.js实现的。思路都差不多，总结一下就是下面三点： 需要在每台需要监控的服务器上启动一个</description>
    </item>
    
    <item>
      <title>Dockerfile镜像和编排</title>
      <link>https://chende.ren/2021/01/31020152-dockerfile.html</link>
      <pubDate>Sun, 31 Jan 2021 02:01:52 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/31020152-dockerfile.html</guid>
      <description>Dockerfile简介 Dockerfile 是一个用来构建镜像的文本文件。文本内容包含了一条条构建镜像所需的指令和说明。 Docker通过读取Dockerfile中的指令自动生成映像。用docker build命令来执行构建。可以加-f标志指向文件系统中任何位置的Dockerfile。例如： docker build -f /path/to/a/Dockerfile Dockerfile 一般分为四部分：基础镜像信息、维护者信息、镜像操作指令和容器</description>
    </item>
    
    <item>
      <title>K8s006 | 数据存储方案</title>
      <link>https://chende.ren/2021/01/29184952-k8s-volume.html</link>
      <pubDate>Fri, 29 Jan 2021 18:49:52 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/29184952-k8s-volume.html</guid>
      <description>默认情况下容器中的磁盘文件是非持久化的，对于运行在容器中的应用来说面临两个问题： 当容器挂掉kubelet将重启启动它时，文件将会丢失； 当Pod中同时运行多个容器，容器之间需要共享文件时。 Kubernetes的Volume解决了这两个问题。内部实现中，一个Volume只是一个目录，目录中可能有一些数据，pod的容器可以访问这些数据。至于这个</description>
    </item>
    
    <item>
      <title>go-zero（三）| zRPC</title>
      <link>https://chende.ren/2021/01/28105429-003-zrpc.html</link>
      <pubDate>Thu, 28 Jan 2021 10:54:29 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/28105429-003-zrpc.html</guid>
      <description>go-zero是一个集成了各种工程实践的包含了Web和RPC协议的功能完善的微服务框架，那么他的RPC功能是如何实现的呢？他自己封装了一个叫zRPC的底层模块，这个模块依赖gRPC，同时内置了服务注册、负载均衡、拦截器等功能，其中还包括自适应降载，自适应熔断，限流等微服务治理方案，是一个简单易用的可直接用于生产的企业级RPC框架。 zRPC</description>
    </item>
    
    <item>
      <title>go-zero（二）| 鉴权</title>
      <link>https://chende.ren/2021/01/27134518-002-jwt-auth.html</link>
      <pubDate>Wed, 27 Jan 2021 13:45:18 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/27134518-002-jwt-auth.html</guid>
      <description>什么是 JWT 根据维基百科的定义，JSON WEB Token（JWT，读作 [/dʒɒt/]），是一种基于JSON的、用于在网络上声明某种主张的令牌（token）。JWT通常由三部分组成: 头信息（header）, 消息体（payload）和签名（signature）。 第一部分头信息指定了该JWT使用的签名算法，HS256 表示使用了 HMAC-SHA256 来生成签名： header = &#39;{&amp;quot;alg&amp;quot;:&amp;quot;HS256&amp;quot;,&amp;quot;typ&amp;quot;:&amp;quot;JWT&amp;quot;}&#39; 第二</description>
    </item>
    
    <item>
      <title>go-zero（一）| 概览</title>
      <link>https://chende.ren/2021/01/27134452-001-go-zero-intr.html</link>
      <pubDate>Wed, 27 Jan 2021 13:44:52 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/27134452-001-go-zero-intr.html</guid>
      <description>2020年8月开源的go-zero微服务框架非常热门。他来自好未来（学而思）的研发团队。这样的研发团队还是很有想法的。当然类似这样的微服务框架其实早就有了，比如go-micro，go-kit等大家也可以尝试。 项目地址：https://github.com/tal-tech/go-zero 文档说明：https://www.yuque.com</description>
    </item>
    
    <item>
      <title>etcd--分布式键值数据库</title>
      <link>https://chende.ren/2021/01/26123213-go-etcd.html</link>
      <pubDate>Tue, 26 Jan 2021 12:32:13 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/26123213-go-etcd.html</guid>
      <description>etcd是CoreOS团队于2013年6月发起的开源项目，它的目标是构建一个高可用的分布式键值(key-value)数据库。etcd内部采用raft协议作为一致性算法，etcd基于Go语言实现。 etcd作为服务发现系统，有以下的特点： 简单：安装配置简单，而且提供了HTTP API进行交互，使用也很简单 安全：支持SSL证书验证 快速：根据官方提</description>
    </item>
    
    <item>
      <title>HTTP2简介</title>
      <link>https://chende.ren/2021/01/26000138-http2.html</link>
      <pubDate>Tue, 26 Jan 2021 00:01:38 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/26000138-http2.html</guid>
      <description>看这篇对gRPC讲解的文章：https://zhuanlan.zhihu.com/p/161577635 本文的内容都是来自上面文章的节选。 HTTP1.1的问题 HTTP1.1以其简单、可读性高、超高普及率、历史悠久，作为经典的存在，为互联网的普及做出了重要贡献。但在当今超高的流量、超高的使用频率背景下，打开一个页面动辄几十个请求，使得速度已</description>
    </item>
    
    <item>
      <title>Windows-Wireshark抓包</title>
      <link>https://chende.ren/2021/01/25103351-wireshark.html</link>
      <pubDate>Mon, 25 Jan 2021 10:33:51 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/25103351-wireshark.html</guid>
      <description>Wireshark是一个网络封包分析软件。网络封包分析软件的功能是撷取网络封包，并尽可能显示出最为详细的网络封包资料。WireShark可以比喻做硬件工程的万用表、示波器，同样我们网络工程师或者软件工程师可以利用wireshark来进行分析网络。 Wireshark是个神器，可惜的是他只能查看封包，而不能修改封包的内容，或者发送封包。 Wireshark 过滤</description>
    </item>
    
    <item>
      <title>RPC（四）| 来自Google的gRPC</title>
      <link>https://chende.ren/2021/01/23215755-004-rpc-grpc.html</link>
      <pubDate>Sat, 23 Jan 2021 21:57:55 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/23215755-004-rpc-grpc.html</guid>
      <description>gRPC是Google开源的一款RPC框架，跟具体语言无关，以protobuf作为IDL，通过protoc来编译框架代码。gRPC的Java实现的底层网络库是基于Netty开发而来，其Go实现是基于net库。 先说下Protobuf，它是一个纯粹的展示层协议，可以和各种传输层协议一起使用；Protobuf的文档也非常完善。 Protobuf具</description>
    </item>
    
    <item>
      <title>RPC（三）| 来自Facebook的Thrift</title>
      <link>https://chende.ren/2021/01/23215014-003-rpc-thrift.html</link>
      <pubDate>Sat, 23 Jan 2021 21:50:14 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/23215014-003-rpc-thrift.html</guid>
      <description>Thrift是Facebook开源提供的一个高性能，轻量级RPC服务框架，其产生正是为了满足当前大数据量、分布式、跨语言、跨平台数据通讯的需求。 但是，Thrift并不仅仅是序列化协议，而是一个RPC框架。相对于JSON和XML而言，Thrift在空间开销和解析性能上有了比较大的提升，对于对性能要求比较高的分布式系统，它是一个优秀的RPC解</description>
    </item>
    
    <item>
      <title>Go总结（十八）| pprof性能分析</title>
      <link>https://chende.ren/2021/01/23175227-018-pprof.html</link>
      <pubDate>Sat, 23 Jan 2021 17:52:27 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/23175227-018-pprof.html</guid>
      <description>Go语言提供了很多性能分析的工具，性能分析类型有如下几种： CPU性能分析 内存性能分析 阻塞性能分析 锁性能分析 CPU性能分析 生成profile文件 Go 的运行时性能分析接口都位于 runtime/pprof 包中。只需要调用 runtime/pprof 库即可得到我们想要的数据。 看下面的例子，随机生成了 5 组数据，并且使用冒泡排序法排序： 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 26 27 28 29 30 31 32 33</description>
    </item>
    
    <item>
      <title>Go总结（十七）| 反射(reflect)</title>
      <link>https://chende.ren/2021/01/23121026-017-reflect.html</link>
      <pubDate>Sat, 23 Jan 2021 12:10:26 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/23121026-017-reflect.html</guid>
      <description>Go语言反射特性（reflect）提供了运行时动态获取对象的类型和值以及动态创建对象的能力。反射可以帮助抽象和简化代码，提高开发效率，但通常降低运行效率。 Go语言中的反射 Go语言提供了一种机制在运行时更新和检查变量的值、调用变量的方法和变量支持的内在操作，但是在编译时并不知道这些变量的具体类型，这种机制被称为反射。反射也可以让我们将类型本</description>
    </item>
    
    <item>
      <title>RPC（二）| Golang gob与rpc简介</title>
      <link>https://chende.ren/2021/01/22132033-002-cus-rpc.html</link>
      <pubDate>Fri, 22 Jan 2021 13:20:33 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/22132033-002-cus-rpc.html</guid>
      <description>Go 语言广泛地应用于云计算和微服务，成熟的 RPC 框架和微服务框架不少；grpc、rpcx、go-zero、go-micro 等都是非常成熟的框架。通常来说RPC 是微服务框架的一个子集，微服务框架可以自己实现 RPC ，或者选择不同的 RPC 框架作为通信基础。 为了深入学习RPC框架，我们这里模拟标准库net/rpc，自己从零开始实现一个，并加入更多的高级特性。 Golang</description>
    </item>
    
    <item>
      <title>RPC（一）| 初识RPC</title>
      <link>https://chende.ren/2021/01/21002733-001-go-rpc.html</link>
      <pubDate>Thu, 21 Jan 2021 00:27:33 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/21002733-001-go-rpc.html</guid>
      <description>通常我们写程序时需要封装，需要函数调用，函数调用通常在本程序内完成。随着计算机技术的发展和需求场景的变化，有时就需要从一台计算机上执行另外一台计算机上的程序的需求，因此发展出来了RPC技术。特别是目前随着互联网技术的快速迭代和发展，用户和需求几乎都是以指数式的方式在高速增长，这个时候绝大多数情况下程序都是部署在多台机器上，就需要在调用其他</description>
    </item>
    
    <item>
      <title>Go总结（十六）| 自定义Log日志</title>
      <link>https://chende.ren/2021/01/19131400-016-go-log.html</link>
      <pubDate>Tue, 19 Jan 2021 13:14:00 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/19131400-016-go-log.html</guid>
      <description>开发软件日志很重要，不管是应用的标准输出信息，还是主动打印的日志，还是被动的异常信息；都有被记录和整理的需求。大数据从哪里来，很多时候其实是从日志中来的。日志很重要，Go标准库也为日志输出内置了大量实用方法。 标准配置 标准库就提供了这些参数，按需要配置就好了： 1 2 3 4 5 6 7 8 9 10 const ( Ldate = 1 &amp;lt;&amp;lt; iota // 日期示例：2021/01/19 Ltime // 时间示例：1</description>
    </item>
    
    <item>
      <title>常用并发压力测试工具</title>
      <link>https://chende.ren/2021/01/14011523-test-tools.html</link>
      <pubDate>Thu, 14 Jan 2021 01:15:23 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/14011523-test-tools.html</guid>
      <description>现在IT领域都讲大数据、高并发、海量连接等时髦词汇，这些特性的系统在上线之前一定会做大量的测试，今天介绍一些常用的性能测试工具。 先认识几个专有名词： 1、吞吐率（Requests per second） 概念：服务器并发处理能力的量化描述，单位是reqs/s，指的是某个并发用户数下单位时间内处理的请求数。某个并发用户数下单位时间内能处理的最大请求数，</description>
    </item>
    
    <item>
      <title>Go总结（十五）| Runner、Pool、Work简介</title>
      <link>https://chende.ren/2021/01/12175509-015-runner-pool-work.html</link>
      <pubDate>Tue, 12 Jan 2021 17:55:09 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/12175509-015-runner-pool-work.html</guid>
      <description>前面我们学习了并发以及解决并发的常用方式；今天我们看看Go语言实现的三种常用并发模式；这些模式可以在实际生产应用中合理使用，免去了我们造轮子的过程。 我们说过通道的性能并不是太好，这个在大批量循环处理的时候的确有些问题。性能不是关键诉求的场景下还是可以的，他能简化编程。这里讲的三种并发模式，都需要结合使用通道和协程。 Runner 下面给出完整的Runn</description>
    </item>
    
    <item>
      <title>Go总结（十四）| Atomic、Mutex、Channel比较</title>
      <link>https://chende.ren/2021/01/12124724-014-con-style-com.html</link>
      <pubDate>Tue, 12 Jan 2021 12:47:24 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/12124724-014-con-style-com.html</guid>
      <description>第九篇文章我们学习了Go解决并发编程问题的三种方式。归根结底都是采用加锁，让并发变成同步访问。那么这些处理方式性能如何呢？ 先介绍一个Linux下面统计时间的命令time，具体可以参考：https://www.runoob.com/linux/linux-comm-time.html 这里做一个测试，启动两个协程，一个对数执行++操作，一个对</description>
    </item>
    
    <item>
      <title>K8s005 | 应用部署示例</title>
      <link>https://chende.ren/2021/05/10144335-k8s-demo.html</link>
      <pubDate>Sun, 10 Jan 2021 14:43:35 +0800</pubDate>
      
      <guid>https://chende.ren/2021/05/10144335-k8s-demo.html</guid>
      <description>这里我们以简单的NodeJS应用为例，总结一下K8s如何部署应用服务。 Docker打包NodeJS应用 将自己的NodeJS应用打包到Docker中有很多种方法，大家可以参考官方文档： https://nodejs.org/zh-cn/docs/guides/nodejs-docker-webapp/ 下面介绍用最简单的方法打包自己的应用，假设我们有个应用agent_server，我们的目录结构如下： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 DXHJ200-142:/home/bmc/dockerdemo # ll total 8 -rw-r--r-- 1 root root</description>
    </item>
    
    <item>
      <title>微服务000 | DevOps方法论</title>
      <link>https://chende.ren/2021/01/08144648-devops-intr.html</link>
      <pubDate>Fri, 08 Jan 2021 14:46:48 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/08144648-devops-intr.html</guid>
      <description>DevOps是什么呢？ 有人说它是一种方法，也有人说它是一种工具，还有人说它是一种思想。更有甚者，说它是一种哲学。 说的有点玄乎，我们看看DevOps的维基百科定义是这样的： DevOps是一组过程、方法与系统的统称，用于促进开发、技术运营和质量保障（QA）部门之间的沟通、协作与整合。 软件工程方法论演变 一个软件从零开始到最终交付，大概包括以下几</description>
    </item>
    
    <item>
      <title>Go总结（十三）| 单元测试</title>
      <link>https://chende.ren/2021/01/07170251-013-unit-test.html</link>
      <pubDate>Thu, 07 Jan 2021 17:02:51 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/07170251-013-unit-test.html</guid>
      <description>Go语言SDK内置了很多实用的工具，默认自带了单元测试、基准测试命令；今天我们来看看如何做好单元测试。 什么是单元测试 百度百科：单元测试（unit testing），是指对软件中的最小可测试单元进行检查和验证。对于单元测试中单元的含义，一般来说，要根据实际情况去判定其具体含义，如C语言中单元指一个函数，Java里单元指一个类，图形化的软件中可</description>
    </item>
    
    <item>
      <title>Go总结（十二）| 基准测试</title>
      <link>https://chende.ren/2021/01/06213457-012-benchmark-test.html</link>
      <pubDate>Wed, 06 Jan 2021 21:34:57 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/06213457-012-benchmark-test.html</guid>
      <description>Go语言SDK内置了很多实用的工具，默认自带了单元测试、基准测试命令；我们先看看基准测试如何使用。 什么是基准测试 百度百科：基准测试是指通过设计科学的测试方法、测试工具和测试系统，实现对一类测试对象的某项性能指标进行定量的和可对比的测试。例如，对计算机CPU进行浮点运算、数据访问的带宽和延迟等指标的基准测试，可以使用户清楚地了解每一款CPU</description>
    </item>
    
    <item>
      <title>一些做过的项目</title>
      <link>https://chende.ren/about/list.html</link>
      <pubDate>Mon, 04 Jan 2021 21:37:58 +0800</pubDate>
      
      <guid>https://chende.ren/about/list.html</guid>
      <description>这么多年，经历过大大小小的项目不少了，罗列一些当做纪念了，后面慢慢补充。 基金销售平台 鼎信汇金是最早一批中国证监会下发基金代销牌照的公司。我们围绕这项重点业务，开发了从前端网站、APP、微信公众号，到基金销售后端系统（交易处理模块采购自恒生电子），以及围绕这项业务的众多子项目；比如财经数据的整理、行情展示、数据指标化研究、基金交易等。特别多</description>
    </item>
    
    <item>
      <title>GoFast（三）| 事件生命周期</title>
      <link>https://chende.ren/2021/01/03104021-003-event-lifecycle.html</link>
      <pubDate>Sun, 03 Jan 2021 10:40:21 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/03104021-003-event-lifecycle.html</guid>
      <description>开发框架要好用，可扩展性、赋予开发者的介入能力很重要。为此我们设计了一套事件机制，让开发人员能够自由介入每次请求的全生命周期，通过Context携带的资源在事件处理函数间自由翱翔。 生命周期 目前事件设计的还很不合理，跟其它模块关联比较多。思路是这样，以后慢慢调整。 Incoming Request │ └─▶ Routing │ └─▶ Instance Logger │ 4**/5** ◀─┴─▶ Before Event │ 4**/5** ◀─┴─▶ User Handler │ 4**/5** ◀─┴─▶ PreSend</description>
    </item>
    
    <item>
      <title>GoFast（二）| 路由核心基于RadixTree</title>
      <link>https://chende.ren/2021/01/02103350-002-radix-tree.html</link>
      <pubDate>Sat, 02 Jan 2021 10:33:50 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/02103350-002-radix-tree.html</guid>
      <description>很多场景中，高效的数据结构都离不开树状结构，什么完全二叉树、红黑树、Radix树、图等好多名词都是具备子孙节点的树状结构，自由灵活的节点内容更让使用者扑朔迷离。一般树都是通过链表来实现，也有通过数组实现的；链表实现自由灵活相对简单，数组实现比较复杂而且不能随意变更节点数量，有其局限性，但是数组实现的内存占用更小更高效。GoFast将采用数</description>
    </item>
    
    <item>
      <title>监控系统总览</title>
      <link>https://chende.ren/2021/01/01195055-intr.html</link>
      <pubDate>Fri, 01 Jan 2021 19:50:55 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/01195055-intr.html</guid>
      <description>监控告警选择Prometheus平台；收集处理应用日志选择EFK。 Open-falcon、Prometheus、Zabbix监控告警系统对比： https://www.jianshu.com/p/210dc70b493e https://www.sohu.com/a/342812843_411876 Zabbix详解： https://www.cnblogs.com/clsn/p/7885990.html Prometheus介绍： https://www.jianshu.com/p/e3bc12f92fc9 小米公司开发的开源监控平台falcon-plus： http://book.open-falcon.com/zh_0_2/ https://github.com/open-falcon/falcon-plus 其它参考文章： https://baijiahao.baidu.com/s?id=1666361143967580868&amp;amp;wfr=spider&amp;amp;for=pc https://zhuanlan.zhihu.com/p/57740192 https://zhuanlan.zhihu.com/p/28253868 https://www.jianshu.com/p/91f9d9ec374f https://www.cnblogs.com/user-sunli/p/14738679.html （完）</description>
    </item>
    
    <item>
      <title>GoFast（一）| 设计概览</title>
      <link>https://chende.ren/2021/01/01120012-001-intr.html</link>
      <pubDate>Fri, 01 Jan 2021 12:00:12 +0800</pubDate>
      
      <guid>https://chende.ren/2021/01/01120012-001-intr.html</guid>
      <description>在这里我对GoFast的主要设计思路做一些概要介绍。 框架核心流程 源代码开始的地方：gofast/fst/fst.go 说明：以后我们也把这些后台WebServer叫做Application，简称App。 CreateServer 每个应用都要从这里开始，在这里我们定义了一个配置结构AppConfig，将来所有的配置参数都放在这里面，配置传入之后我们要做一些默认值的设</description>
    </item>
    
    <item>
      <title>GoFast--README</title>
      <link>https://chende.ren/2020/12/31101316-readme.html</link>
      <pubDate>Thu, 31 Dec 2020 10:13:16 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/31101316-readme.html</guid>
      <description>[Preview] 当前持续完善中，不可生产中使用 [Preview] GoFast Micro-Service Framework GoFast是一个用Go语言实现的微服务开发框架。他的产生源于目前流行的gin、go-zero、fastify等众多开源框架；同时结合了作者多年的开发实践经验，很多模块的实现方式都是作者首创；当然也免不了不断借鉴社区中优秀的设计理念。我们的目标是简洁高效易上手，在封装大量特性的同时又不失灵活性。希望</description>
    </item>
    
    <item>
      <title>Go总结（十一）| 接口与方法集</title>
      <link>https://chende.ren/2020/12/29224725-011-interface-methods.html</link>
      <pubDate>Tue, 29 Dec 2020 22:47:25 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/29224725-011-interface-methods.html</guid>
      <description>Go学习第四篇文章已经学习了类型的方法集，分值接收者和指针接收者，而且值和指针变量都可以自由调用这些方法。但接口的变量却不能随意调用实现者的方法集，这里有文章。 接口的认识 Go语言中接口（interface）非常重要，他被用来约定一组行为，凡是具备这一组行为的类型，都可以看做是该接口的派生类型。利用这种特性，我们就能抽象出一类行为，将来功能</description>
    </item>
    
    <item>
      <title>Go总结（十）| unsafe包高级编程</title>
      <link>https://chende.ren/2020/12/29174708-010-unsafe-pkg.html</link>
      <pubDate>Tue, 29 Dec 2020 17:47:08 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/29174708-010-unsafe-pkg.html</guid>
      <description>Go语言中的unsafe包非常简单，但是威力强大，用不少就出问题。整个包就这些代码： 1 2 3 4 5 6 7 package unsafe type ArbitraryType int type Pointer *ArbitraryType func Sizeof(x ArbitraryType) uintptr func Offsetof(x ArbitraryType) uintptr func Alignof(x ArbitraryType) uintptr 一个指针就能让你在内存的海洋随意穿梭，没有限制，你走到哪里看到哪里，想从什么角度看就给你呈现什么角度的值。这让我想起了《黑客帝国》中的巡游机器人&amp;hellip; 示例 下面这个例子，加深对数据类型，和uns</description>
    </item>
    
    <item>
      <title>NodeJS安装oracledb包注意事项</title>
      <link>https://chende.ren/2020/12/28145150-install-oracledb.html</link>
      <pubDate>Mon, 28 Dec 2020 14:51:50 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/28145150-install-oracledb.html</guid>
      <description>参考： https://oracle.github.io/node-oracledb/INSTALL.html#instzip https://www.cnblogs.com/rysinal/p/7779055.html 关键是Oracle客户端链接库的安装和环境变量的设置；之后如果服务器是没有外网的话，编译oracledb包的时候可能会遇到麻烦。 1 2 3 4 5 6 7 8 9 # vi /etc/profile 最后加入下面环境变量 # 或者在当前用户比如root用户： /root/.bash_profile 中加入 export OCI_INCLUDE_DIR=/opt/oracle/instantclient_11_2/sdk/include export OCI_INC_DIR=/opt/oracle/instantclient_11_2/sdk/include export OCI_LIB_DIR=/opt/oracle/instantclient_11_2 export LD_LIBRARY_PATH=/opt/oracle/instantclient_11_2:$LD_LIBRARY_PATH export NLS_LANG=&amp;#39;SIMPLIFIED CHINESE_CHINA.ZHS16GBK&amp;#39; export NLS_NCHAR=&amp;#39;SIMPLIFIED CHINESE_CHINA.AL16UTF16&amp;#39; 1 2 3 4 5 6 7 8 9 10 11 12 # 可以更新NPM包 sudo npm install npm -g # 或者别的机器copy一份npm的包</description>
    </item>
    
    <item>
      <title>Go总结（九）| goroutine&#43;channel并发编程</title>
      <link>https://chende.ren/2020/12/28140907-009-concurrency.html</link>
      <pubDate>Mon, 28 Dec 2020 14:09:07 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/28140907-009-concurrency.html</guid>
      <description>goroutine 在Go里，每一个并发执行的活动成为goroutine。 当一个程序启动时, 只有一个goroutine来调用main函数，称它为主goroutine。新的goroutine通过go语句进行创建。语法上，一个go语句是在普通的函数或者方法调用前加上go关键字前缀。main函数返回时，main函数中其他所有的goroutine都暴力直接终结，然</description>
    </item>
    
    <item>
      <title>Go总结（八）| 运行时调度器模型GMP</title>
      <link>https://chende.ren/2020/12/27221039-008-gmp-model.html</link>
      <pubDate>Sun, 27 Dec 2020 22:10:39 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/27221039-008-gmp-model.html</guid>
      <description>Go语言最大的特色就是其并发编程模型，多处理器的时候还可以自动实现真正的并行计算。这些复杂的调度算法被打包在了Go语言运行时当中。 分时调度 先回顾一下操作系统。 操作系统本身就是对硬件资源的一个大调度器；如果没有多任务的需求，我们都不需要这么复杂的调度，不需要分时操作系统；一直算个不停，一条路走到黑反而是利用率最高的；事实上最早期的操作系统就</description>
    </item>
    
    <item>
      <title>Go总结（七）| 格式化输出字符串</title>
      <link>https://chende.ren/2020/12/27110323-print-format.html</link>
      <pubDate>Sun, 27 Dec 2020 11:03:23 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/27110323-print-format.html</guid>
      <description>格式化参数非常多，这里列出一些常用的： verb 描述 %b,%o,%d,%x 二进制、八进制、十进制、十六进制整数 %X 十六进制整数、字母大写 %f,%g,%e 浮点数：如3.141593，3.141592653589793，3.141593e+00 %v 按值的本来值输出 %+v 在 %v 基础上，对结构体字段名和值进行展开 %#v Go 语言语法格式的值 %t 布尔值：true或false %T 任何值的类型，用到反射：refle</description>
    </item>
    
    <item>
      <title>搭建博客（三）| 选用Typora编辑文章</title>
      <link>https://chende.ren/2020/12/26213256-003-use-md-editor.html</link>
      <pubDate>Sat, 26 Dec 2020 21:32:56 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/26213256-003-use-md-editor.html</guid>
      <description>当下流行的笔记类应用非常多，其中不乏互联网头部公司的身影，比如：印象笔记、有道云笔记、石墨文档、WPS Office、notion等，跨平台、云同步、丰富的录音、视频、表格、版本控制等特性都很棒；但是一但涉及到云同步就肯定会有钱的问题，没有人会无缘无故给你保存资料，除了腾讯&amp;hellip; 付费不是主要问题，为优质服务埋单是天经地义的事。我们</description>
    </item>
    
    <item>
      <title>搭建博客（二）| 选用hugo静态站点生成工具</title>
      <link>https://chende.ren/2020/12/25120101-002-use-hugo.html</link>
      <pubDate>Fri, 25 Dec 2020 12:01:01 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/25120101-002-use-hugo.html</guid>
      <description>现在写文字几乎都会保存成markdown格式的文件；之后会针对不同的平台，套用不同的解析包，在不同的平台展示最后的效果。这就涉及到2个问题 找一套markdown编辑器工具，方便写作。 能把markdown转换成html网页的工具，方便建站。 这两样东西我都找到了，一个是Typora，下一篇再说；另外一个就是今天的主角Hugo。不多做解释，直接</description>
    </item>
    
    <item>
      <title>搭建博客（一）| 全栈开发一套博客系统</title>
      <link>https://chende.ren/2020/12/25112829-try-full-stack.html</link>
      <pubDate>Fri, 25 Dec 2020 11:28:29 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/25112829-try-full-stack.html</guid>
      <description>前些天我已经写过一篇关于博客网站搭建的文章：/2020/12/02192815-set-up-your-website.html，操作细节写的不够具体，从今天开始我准备把这件事当做一个系列文章来写，和大家分享如何从零开始搭建个人个性化博客网站。 为什么要自己搭建博客 可能有人会问，现在博客平台多的很，比如：知乎、掘金、简书、CSDN、cnbl</description>
    </item>
    
    <item>
      <title>Go安装 | Golang环境配置</title>
      <link>https://chende.ren/2020/12/25102348-install-go.html</link>
      <pubDate>Fri, 25 Dec 2020 10:23:48 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/25102348-install-go.html</guid>
      <description>Linux上安装golang 上https://golang.google.cn/dl/下载对应的包，整体放入/usr/local下面，然后解压缩，删除压缩包，添加环境变量，应用设置使生效。下面是操作命令。 1 2 3 4 5 6 7 8 9 10 11 # 下载对应的包，放入/usr/local/并解压 wget https://golang.google.cn/dl/go1.15.6.linux-amd64.tar.gz tar -xzvf go1.15.6.linux-amd64.tar.gz vi /etc/profile # 在最后一行添加 export GOROOT=/usr/local/go export PATH=$PATH:$GOROOT/bin # 保存退出后source一下</description>
    </item>
    
    <item>
      <title>Go总结（六）| 正则表达式</title>
      <link>https://chende.ren/2020/12/22121301-006-regexp.html</link>
      <pubDate>Tue, 22 Dec 2020 12:13:01 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/22121301-006-regexp.html</guid>
      <description>Go语言正则表达式稍微有些复杂；下面做整理记录。 https://blog.csdn.net/chinabestchina/article/details/104764849 https://blog.csdn.net/u013870094/article/details/70142492?utm_source=blogxgwz4 （未完待续&amp;hellip;）</description>
    </item>
    
    <item>
      <title>Windows使用小技巧</title>
      <link>https://chende.ren/2020/12/16133216-tips.html</link>
      <pubDate>Wed, 16 Dec 2020 13:32:16 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/16133216-tips.html</guid>
      <description>任意目录右键打开CMD 新建一个.reg文件，将下面代码放入保存，双击导入注册表即可。 1 2 3 4 5 6 7 Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_here] &amp;#34;ShowBasedOnVelocityId&amp;#34;=dword:00639bc8 [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_here\command] @=&amp;#34;cmd.exe /s /k pushd \&amp;#34;%V\&amp;#34;&amp;#34; 利用PowerShell发http请求 Invoke-WebRequest url -Method GET -ContentType &amp;quot;application/json&amp;quot; # 或者控制台下面这个命令试一试 curl -i url # 发送POST请求 curl -H &amp;quot;Content-Type: application/json&amp;quot; -X POST --data &#39;{&amp;quot;data&amp;quot;:&amp;quot;1&amp;quot;}&#39; http://127.0.0.1/root curl 命令详解：https://www.cnblogs.com/leizia/p/16322061</description>
    </item>
    
    <item>
      <title>Flutter学习：启动页</title>
      <link>https://chende.ren/2020/12/16012331-study-splash.html</link>
      <pubDate>Wed, 16 Dec 2020 01:23:31 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/16012331-study-splash.html</guid>
      <description>今天介绍Flutter如何制作启动页。 这里先看看官方文档介绍启动页时给出的示意图： 整个过程大致就这四步： 显示Android启动界面LaunchTheme 显示普通主题NormalTheme 普通主题退出到正式进入Flutter界面的过渡效果 正式进入Flutter界面 如何配置启动页 先看下面这张图，所有配置的东西都在这里面，不用写一行代码。 A：a</description>
    </item>
    
    <item>
      <title>Windows下搭建Flutter开发环境</title>
      <link>https://chende.ren/2020/12/15002339-install-intr.html</link>
      <pubDate>Tue, 15 Dec 2020 00:23:39 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/15002339-install-intr.html</guid>
      <description>很多开发工具的环境搭建过程都不是太简单，跟这些技术主要还是来自MG有很大的关系；就一个网络不通，往往很多时候都能把人急死，特别是这几年封锁的趋势越来越明显，不光是我们个人要翻墙，大厂更需要带头翻墙搭建镜像服务器。 我用Windows 10，这里把Windows配置Flutter开发环境的过程记录一下，避免下次还要搭建遇到同样的问题费时间。 国内</description>
    </item>
    
    <item>
      <title>Linux中安装vmware</title>
      <link>https://chende.ren/2020/12/14102443-vmware.html</link>
      <pubDate>Mon, 14 Dec 2020 10:24:43 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/14102443-vmware.html</guid>
      <description>VMware16.2在centos新内核上安装 新版内核报错 CentOS的内核在不断的升级，如果你用yum install kernel以后很可能内核版本会比较高，此时安装VMware16.1等以上版本的时候，需要编译。期间很可能出现各种错误，比如我在4.18.0-348.2.1.el8_5.x86_64内核中安装VMware16.2出现下面的错误： ... #define PCI_DEVICE_ID_VMWARE_VMXNET3</description>
    </item>
    
    <item>
      <title>Flutter1.22.x与AS4.1版本不匹配</title>
      <link>https://chende.ren/2020/12/13012639-error-with-flutter1.22.x.html</link>
      <pubDate>Sun, 13 Dec 2020 01:26:39 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/13012639-error-with-flutter1.22.x.html</guid>
      <description>我现在是用Windows开发，今天刚升级了一把Android Studio 4.1版本，而且安装过程中把AS4.0勾上删除了，另外还升级了Flutter 1.22.4。结果就悲剧了，看下面的截图： 1 2 3 [!] Android Studio (version 4.1.0) X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. 上网找了一圈，大概说是Flutter 1.22的小问题，1.23修复了这个和新版AS不匹配的地方。虽然报这</description>
    </item>
    
    <item>
      <title>Flutter开发常见问题</title>
      <link>https://chende.ren/2020/12/12202639-some-issues.html</link>
      <pubDate>Sat, 12 Dec 2020 20:26:39 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/12202639-some-issues.html</guid>
      <description>Dart语言学习：dartcn.com Flutter 中文社区：flutter.cn 开发Flutter会用到大量的三方库，pub.dev访问是很慢的，这个时候就需要一个中国镜像： # 下面两个环境变量 FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn PUB_HOSTED_URL: https://pub.flutter-io.cn flutter doctor # 检查flutter开发环境是否合格 flutter config # 查看设置一些环境变量 flutter doctor --android-licenses # 更新证书 flutter channel # 查看当前使用的flutter版本 flutter upgrade # 升级flutter flutter emulators #</description>
    </item>
    
    <item>
      <title>Linux配置VNC远程桌面</title>
      <link>https://chende.ren/2020/12/11142443-vnc.html</link>
      <pubDate>Fri, 11 Dec 2020 14:24:43 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/11142443-vnc.html</guid>
      <description>有时候需要远程Linux主机有图形界面，这个时候就需要配置VNC远程登录。能在Linux桌面中远程Windows系统吗？能在Windows系统中直接打开Linux的桌面应用程序吗？在这里全部告诉你。 openSUSE配置VNC 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 # 1. 安装软件 zypper in gnome-shell 或 zypper in kde zypper in vncmanager # zypper in tigervnc 这个可以不装 # 2. 修改系统默认启动图形</description>
    </item>
    
    <item>
      <title>K8s004 | 虚拟机搭建集群</title>
      <link>https://chende.ren/2020/12/09121959-k8s-config.html</link>
      <pubDate>Wed, 09 Dec 2020 12:19:59 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/09121959-k8s-config.html</guid>
      <description>本文将试验在虚拟机上用CentOS8.1系统搭建典型的K8s集群（1Master + 3Worker），K8s版本1.28.2 以下内容如没有特别说明，意味着所有参与集群的服务器都要配置。 1. 环境准备 本次搭建用了三台vmware虚拟机，操作系统全部安装centos8.1 1 2 3 4 5 6 7 8 # uname -a Linux k8smaster1 4.18.0-147.el8.x86_64 #1 SMP Wed Dec 4 21:51:45 UTC 2019 x86_64 GNU/Linux # 修改三台机器的 /etc/hosts 10.10.213.1 k8smaster1 10.10.213.11 k8snode11 10.10.213.12 k8snode12</description>
    </item>
    
    <item>
      <title>K8s003 | Minikube快速模拟K8s</title>
      <link>https://chende.ren/2020/12/08151959-minikube-intr.html</link>
      <pubDate>Tue, 08 Dec 2020 15:19:59 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/08151959-minikube-intr.html</guid>
      <description>使用Minikube是运行Kubernetes集群最简单、最快捷的途径。Minikube是一个构建单节点集群的工具，对于测试Kubernetes和本地开发应用都非常有用。 搭建过K8s的同学应该都被虐过，复杂的认证，配置环节相当折磨人，出错率相当高，而minikube就是为解决这个问题而衍生出来的工具，它基于go语言开发，可以在单机环境下快</description>
    </item>
    
    <item>
      <title>Flutter--跨端UI终极解决方案</title>
      <link>https://chende.ren/2020/12/06202020-next-ui.html</link>
      <pubDate>Sun, 06 Dec 2020 20:20:20 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/06202020-next-ui.html</guid>
      <description>想起李笑来07年的时候对比特币的评价：“此物一出天下反”。这里我想用同样这句话来形容Flutter技术，这真是一项伟大的创新，他将终结目前所有的跨端技术。Flutter&amp;ndash; 跨端UI终极解决方案。 引起重视 我是2019年下半年才关注到Flutter技术，当时只是简单的看了些介绍就被惊到了，心想终于不用再惦记着学习啥 Hybrid、Re</description>
    </item>
    
    <item>
      <title>说说数据高可用方案</title>
      <link>https://chende.ren/2020/12/06091228-data-ha.html</link>
      <pubDate>Sun, 06 Dec 2020 09:12:28 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/06091228-data-ha.html</guid>
      <description>高可用（High Availability），英文缩写是HA，是现代系统架构必须要衡量的一个重要指标；他指的是通过系统架构设计减少系统不能提供服务的时间。 假设系统一直能够提供服务，我们说系统的可用性是100%，如果系统每运行100个时间单位，会有1个时间单位无法提供服务，我们说系统的可用性是99%。很多公司的高可用目标是4个9，也就是99.</description>
    </item>
    
    <item>
      <title>K8s002 | 常用命令汇总</title>
      <link>https://chende.ren/2020/12/11093656-k8s-cmd.html</link>
      <pubDate>Sat, 05 Dec 2020 09:36:56 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/11093656-k8s-cmd.html</guid>
      <description>随着K8s版本的变更，很多配置写法和命令发生着变化。下面收集一些常用的命令 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 # 在Master中检查集群的状态： kubectl cluster-info kubectl get cs kubectl get pod --all-namespaces kubectl delete pod xxx # 删除pod kubectl get nodes kubectl get service kubectl get serviceaccounts kubectl get all -n kube-system # 查看命名空间 # 输出service的配置编排文件 kubectl get service nginx -n nginx -o yaml # 查看某个Pod详细 kubectl describe pod coredns-5dd5756b68-s2l2b -n kube-system # 查看Pod的标签 kubectl get pods</description>
    </item>
    
    <item>
      <title>K8s001 | 简介</title>
      <link>https://chende.ren/2020/12/04133656-k8s-intr.html</link>
      <pubDate>Fri, 04 Dec 2020 13:36:56 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/04133656-k8s-intr.html</guid>
      <description>Kubernetes是一个完备的分布式系统支撑平台。Kubernetes具有完备的集群管理能力，包括多层次的安全防护和准入机制、多租户应用支撑能力、透明的服务注册和服务发现机制、内建的智能负载均衡器、强大的故障发现和自我修复能力、服务滚动升级和在线扩容能力、可扩展的资源自动调度机制，以及多粒度的资源配额管理能力。同时，Kubernetes</description>
    </item>
    
    <item>
      <title>如何搭建自己的博客网站</title>
      <link>https://chende.ren/2020/12/02192815-set-up-your-website.html</link>
      <pubDate>Wed, 02 Dec 2020 19:28:15 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/02192815-set-up-your-website.html</guid>
      <description>从零开始自己搭建一个博客系统涉及的事有那些呢？ 上阿里云买一个域名 上阿里云弄台服务器 域名工信部备案，再到公安部报备 找一款免费的博客生成软件 找一套自己喜欢的博客皮肤 找一款适合编辑Markdown文字的编辑器 各种服务器软件配置 上个SSL证书 上各种统计，支持评论 步骤还真不少，这还是最基本的，每一项都需要不少的工作量，下面具体再说。 买域名 暂时省略好</description>
    </item>
    
    <item>
      <title>async/await到底怎么回事</title>
      <link>https://chende.ren/2020/12/01212601-async-await.html</link>
      <pubDate>Tue, 01 Dec 2020 21:26:01 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/01212601-async-await.html</guid>
      <description>看完下面这篇文章，你就明白了： https://segmentfault.com/a/1190000007535316 http://www.ruanyifeng.com/blog/2015/05/async.html （未完待续&amp;hellip;）</description>
    </item>
    
    <item>
      <title>SVN常见问题处理</title>
      <link>https://chende.ren/2020/12/01193216-svn-skill.html</link>
      <pubDate>Tue, 01 Dec 2020 19:32:16 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/01193216-svn-skill.html</guid>
      <description>常用命令 1 2 3 4 5 6 7 8 9 10 svn pe svn:externals . --editor-cmd vim # 修改扩展模块的地址 svn switch --relocate {origin_url} {current_url} # 这个只改变域名或IP部分，后面的地址要一致。 svn switch New_URL # 这个更直接，就是替换成新的地址。 # 只checkout单个文件，需要先签出空目录，再获取单个文件 svn co --depth=empty svn://x.x.x.x/soft soft_new svn up etcd-v3.4.14-linux-arm64.tar.gz # 下面的命令就可以初始化一个SVN仓库 svnadmin create /my_project_dir 用SVN签出github上面的代码 1 2 3 # 比如下面目录，将 /tree/master/ 换</description>
    </item>
    
    <item>
      <title>学习 | 经典博客文章收藏</title>
      <link>https://chende.ren/2020/12/01193216-blog-list.html</link>
      <pubDate>Tue, 01 Dec 2020 19:32:16 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/01193216-blog-list.html</guid>
      <description>序列化反序列化技术方案比较 https://tech.meituan.com/2015/02/26/serialization-vs-deserialization.html Node.JS项目中如何提高JSON序列化的性能 https://juejin.cn/post/6844903860595605517 GO写的开源消息系统NSQ，和kafka、RabbitMQ竞争 https://www.oschina.net/p/nsq?hmsr=aladdin1e1 https://www.zhihu.com/question/43557507/answer/2914586926 (一文搞懂kafka) go-redis连接池 https://ijackey.com/go-redis-%E8%BF%9E%E6%8E%A5%E6%B1%A0-529.html 监控运维，数据可视化度量分析，预警：Grafana https://blog.csdn.net/bbwangj/article/details/81109615 gRPC框架解析 https://zhuanlan.zhihu.com/p/161577635 各种分布式限流算法实战 https://wansuanfa.com/ https://www.infoq.cn/article/Qg2tX8fyw5Vt-f3HH673 etcd分布式键值存储工具 https://www.jianshu.com/p/f68028682192 K8s使用文档 https://kubernetes.io/zh-cn/docs/home/ https://www.kancloud.cn/zatko/service_pod/2290785 微服务i</description>
    </item>
    
    <item>
      <title>我的收藏工具箱</title>
      <link>https://chende.ren/2020/12/01193216-favorite.html</link>
      <pubDate>Tue, 01 Dec 2020 19:32:16 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/01193216-favorite.html</guid>
      <description>借助别人的成果，快速推进自己的工作，事半功倍。重在平时积累！ 可视化技巧 d3js.org Web端图形化库的鼻祖，强大到不能再强大 makeapie.com | echarts.apache.org 百度贡献的图表库 Echarts www.anychart.com Web端可视化图标控件 www.finereport.com 可视化报表工具，商业软件 安全技术 www.freessl.cn 免费SSL证书 研发管理 pingcode.com 研发生命周期管理工具 办公软件 www.dooccn.com 神人搞的在线编程试验工具，非常实用 学习网站 www.topgoer.com 非常全的Go学习资料 开源项目 github.com/mojocn/base64Captcha Go图片验证码 github.com/samber/lo</description>
    </item>
    
    <item>
      <title>Git和Github使用简介</title>
      <link>https://chende.ren/2020/12/01093916-git-github-cmd.html</link>
      <pubDate>Tue, 01 Dec 2020 09:39:16 +0800</pubDate>
      
      <guid>https://chende.ren/2020/12/01093916-git-github-cmd.html</guid>
      <description>常用命令 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 26 27 28 29 30 31 git config --local credential.helper store # 保存本地仓库的账号 git config --global credential.helper store # 保存git全局账号 git remote -v # 查看当前项目的远程地址信息(类似 svn info) git add . git commit # git commit -am &amp;#34;des&amp;#34; git pull git push git status # 列出文件状态 git diff [file] # 查看[修改文件]与[本地仓库文件]差异 git diff --cached [file] # 查看[本地仓库文件]与[远程仓库文件]差异 # 解决冲突第一种：放弃</description>
    </item>
    
    <item>
      <title>图解开源协议</title>
      <link>https://chende.ren/2020/11/30223656-open-soft.html</link>
      <pubDate>Mon, 30 Nov 2020 22:36:56 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/30223656-open-soft.html</guid>
      <description></description>
    </item>
    
    <item>
      <title>Docker常用命令汇总</title>
      <link>https://chende.ren/2020/11/30113656-docker-cmd.html</link>
      <pubDate>Mon, 30 Nov 2020 11:36:56 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/30113656-docker-cmd.html</guid>
      <description>install 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 # 首先需要安装docker程序，然后开启守护进程 zypper in docker # install docker systemctl status docker.service systemctl start docker.service # 开启守护进程 docker info # 查看docker状态信息 docker run hello-world #可以用来验证是否成功安装 # 安装完docker之后，最好给他换一个目录，否则将来文件可能很多很大 # 最好改一下下面的bip，让</description>
    </item>
    
    <item>
      <title>Go总结（五）| 强大的HTML模板解析</title>
      <link>https://chende.ren/2020/11/28191301-005-template.html</link>
      <pubDate>Sat, 28 Nov 2020 19:13:01 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/28191301-005-template.html</guid>
      <description>Go语言模板引擎的使用可以分为三部分：定义模板文件、解析模板文件和模板渲染。 定义模板 按照相应的语法编写模板文件。 1 2 3 4 5 6 7 8 &amp;lt;html&amp;gt; &amp;lt;head&amp;gt; &amp;lt;title&amp;gt;模板文件&amp;lt;/title&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt; hello {{ . }} &amp;lt;/body&amp;gt; &amp;lt;/html&amp;gt; Go语言内置了文本模板引擎text/template和用于HTML文档的html/template。它们的作用机制可以简单归纳如下</description>
    </item>
    
    <item>
      <title>Docker简介</title>
      <link>https://chende.ren/2020/11/28093656-docker-intr.html</link>
      <pubDate>Sat, 28 Nov 2020 09:36:56 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/28093656-docker-intr.html</guid>
      <description>容器 谈到容器，有人首先会想到 LXC（Linux Container）。它是一种内核虚拟化技术，是一种操作系统层次上的资源的虚拟化。在 Docker出现之前，就已经有一些公司在使用 LXC技术。容器技术的使用，大大提升了资源利用率，降低了成本。 直接使用 LXC稍显复杂，企业拥抱容器技术具有一定的门槛，可以说 Docker的出现改变了这一局面。Dock</description>
    </item>
    
    <item>
      <title>Go总结（四）| 类型方法（Method）</title>
      <link>https://chende.ren/2020/11/26201301-004-func-method.html</link>
      <pubDate>Thu, 26 Nov 2020 20:13:01 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/26201301-004-func-method.html</guid>
      <description>Go语言没有复杂的class概念，严格来说不是面向对象的语言，她和C语言很像，是面向函数的；Go中函数用关键字func来声明。Go没有class但是有struct、interface，可以把他们理解成类型定义；问题来了，有一种用func声明的函数可以指定struct、interface类型的接收者，这种函数在Go语言中单独叫做方法；方法的</description>
    </item>
    
    <item>
      <title>Go总结（三）| 函数传值和传指针的区别</title>
      <link>https://chende.ren/2020/11/26122308-003-pass-value-pointer.html</link>
      <pubDate>Thu, 26 Nov 2020 12:23:08 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/26122308-003-pass-value-pointer.html</guid>
      <description>其实Go语言函数中所有的传参传递的都是拷贝。只不过有的copy是值类型的副本，有些copy是指针类型的副本。 Go语言实战 《Go语言实战》这本书有下面这两段描述。 内置类型是由语言提供的一组类型。我们已经见过这些类型，分别是数值类型、字符串类型和布尔类型。这些类型本质上是原始的类型。因此，当对这些值进行增加或者删除的时候，会创建一个新值。基于</description>
    </item>
    
    <item>
      <title>GoFast（零）| 为什么写这个WEB Framework</title>
      <link>https://chende.ren/2020/11/26010137-001-why-need-gofast.html</link>
      <pubDate>Thu, 26 Nov 2020 01:01:37 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/26010137-001-why-need-gofast.html</guid>
      <description>当前Go语言生态中的WEB开发框架已经有很多了，比如 gin、beego、iris 等，各有各的特点，经过这几年的沉淀已经足够优秀了。那我还不拿来主义直接用，还要再造个轮子干啥呢？大致是因为这几点考虑： gin足够简洁高效，但太简了，我需要继续封装点东西，方便后期开发 beego特性丰富，不过封装的层级太多，代码量大看着头晕，封装过多性能下降 ir</description>
    </item>
    
    <item>
      <title>Go总结（二）| 类型占用内存大小探究</title>
      <link>https://chende.ren/2020/11/25172308-002-type-memory-size.html</link>
      <pubDate>Wed, 25 Nov 2020 17:23:08 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/25172308-002-type-memory-size.html</guid>
      <description>数据类型的本质是内存空间，每种语言都有大量丰富的预定义类型，以方便开发。每种数据类型究竟占用多少内存空间呢？我相信很多学编程的人并不十分清楚这个问题，然而要想写出高质量的代码、设计高效的数据结构、开发优良的底层工具类项目；对内存空间的了解就很有必要了，这样才能尽可能节省内存空间，提高CPU和缓存之间的命中率，进而提高核心代码的性能。 基础类</description>
    </item>
    
    <item>
      <title>Go总结（一）| 数据类型的本质</title>
      <link>https://chende.ren/2020/11/25121301-001-all-types.html</link>
      <pubDate>Wed, 25 Nov 2020 12:13:01 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/25121301-001-all-types.html</guid>
      <description>每种编程语言都设计了自己的数据类型系统，数据类型的本质是什么？ 我上大学才开始接触计算机的概念（太晚了），老师说现代计算机叫存储程序式计算机（冯诺依曼体系结构），现在我更直白的理解就是计算机是由CPU + IO设备组成的。IO设备就是数据，CPU就是对这些数据进进出出一顿算。我们常说的内存是IO设备的一种，IO设备种类繁多不好说清楚问题，这里我</description>
    </item>
    
    <item>
      <title>Linux命令001 | 系统常用配置汇总</title>
      <link>https://chende.ren/2020/11/25101228-cmd.html</link>
      <pubDate>Wed, 25 Nov 2020 10:12:28 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/25101228-cmd.html</guid>
      <description>Linux常用命令 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 useradd -g users -m chende # 创建用户 # 没有命令ll，三步走解决问题 vim ~/.bashrc alias ll=&amp;#39;ls $LS_OPTIONS -l&amp;#39; source ~/.bashrc # 有些vim复制的行自己动加注释，加入下面这句就可以 vi /root/.vimrc :set paste # 如果vim没有颜色，请安装包：zypper in vim-data # 如果想换一套颜色方案 vi</description>
    </item>
    
    <item>
      <title>JSONP和CROS解决跨域请求</title>
      <link>https://chende.ren/2020/11/23131440-jsonp-cros.html</link>
      <pubDate>Mon, 23 Nov 2020 13:14:40 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/23131440-jsonp-cros.html</guid>
      <description>浏览器的同源安全策略 浏览器只允许请求当前域的资源，拒绝其它域的资源请求。下面这几个地方任何不一样就算是跨域： 请求协议http,https不同 域domain不同 端口port不同 解决浏览器跨域请求的问题，常见的做法是JSONP（json with padding 填充式json）和CROS（Cross-origin resource sharing 跨域资源共享），JSONP更简单浏览器兼容性也好</description>
    </item>
    
    <item>
      <title>XSS和CSRF简介和防范</title>
      <link>https://chende.ren/2020/11/23094915-xss-csrf.html</link>
      <pubDate>Mon, 23 Nov 2020 09:49:15 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/23094915-xss-csrf.html</guid>
      <description>XSS简介 XSS（Cross Site Script），即跨站脚本攻击；其原本缩写是 CSS，但为了和层叠样式表(Cascading Style Sheet)有所区分，在安全领域叫做 XSS。 XSS 攻击是指攻击者在网站上注入恶意的客户端代码，通过恶意脚本对客户端网页进行篡改，从而在用户浏览网页时，对用户浏览器进行控制或者获取用户隐私数据的一种攻击方式。 攻击者对客户端网</description>
    </item>
    
    <item>
      <title>Firewall Vpn</title>
      <link>https://chende.ren/2020/11/22182840-firewall-vpn.html</link>
      <pubDate>Sun, 22 Nov 2020 18:28:40 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/22182840-firewall-vpn.html</guid>
      <description></description>
    </item>
    
    <item>
      <title>Vsftp &amp;&amp; Sftp</title>
      <link>https://chende.ren/2020/11/03012443-vsftp.html</link>
      <pubDate>Tue, 03 Nov 2020 01:24:43 +0800</pubDate>
      
      <guid>https://chende.ren/2020/11/03012443-vsftp.html</guid>
      <description>Vsftp常见配置 一般来说需要加一个Linux系统用户，指定系统用户的默认跟目录就是ftp操作的目录，限制ftp用户登录之后只能对自己家目录的访问，其它目录不可随意访问。特殊情况也可以用root用户登录，打开家目录的限制，能访问全盘的文件。此时安全性较差，谨慎使用。 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 26 27 28 29 30 31 32 33 34 35 36 37</description>
    </item>
    
    <item>
      <title>VS开发基于Linux系统的应用</title>
      <link>https://chende.ren/2020/10/29215703-ide.html</link>
      <pubDate>Thu, 29 Oct 2020 21:57:03 +0800</pubDate>
      
      <guid>https://chende.ren/2020/10/29215703-ide.html</guid>
      <description>NOTE VS是常用的开发c/c++程序的IDE，然而如何开发运行在Linux上的程序呢？不用着急，VS很好的支持了，通过远程调试的方式开发基于Linux的应用。 首先就是设置开发环境。 参考下面的博客： https://www.cnblogs.com/apocelipes/p/11431808.html https://www.cnblogs.com/apocelipes/p/10899484.html https://www.sohu.com/a/315920281_120050810 gcc 和 g++ 的区别 什么是 gcc / g++ 首先说明：gcc 和 GCC 是两个不同的东西 GCC:GNU Compiler Collection(GUN 编译器集合)，它可以编译C、C++、Java、Fortran、Pascal、</description>
    </item>
    
    <item>
      <title>用CMake文件发布c/c&#43;&#43;应用程序</title>
      <link>https://chende.ren/2020/10/22215703-cmake-intra.html</link>
      <pubDate>Thu, 22 Oct 2020 21:57:03 +0800</pubDate>
      
      <guid>https://chende.ren/2020/10/22215703-cmake-intra.html</guid>
      <description>NOTE c/c++写好的程序，如何发布呢？很多时候都需要直接发布源代码，使用者根据具体的环境编译安装。大家最熟悉的就是make &amp;amp;&amp;amp; make install。 可是makefile写起来过于复杂，于是就有了进一步的封装，cmake就是对make的封装，学会写CMakefile.txt文件是C++程序猿必不可少的技能， 于是我们学习一些CMake的使用方法。 参考</description>
    </item>
    
    <item>
      <title>Node.js写的http性能测试工具</title>
      <link>https://chende.ren/2020/10/07215703-autocannon.html</link>
      <pubDate>Wed, 07 Oct 2020 21:57:03 +0800</pubDate>
      
      <guid>https://chende.ren/2020/10/07215703-autocannon.html</guid>
      <description>大神用Node.js写的http服务性能测试工具：autocannon 背景简介 A HTTP/1.1 benchmarking tool written in node, greatly inspired by wrk and wrk2, with support for HTTP pipelining and HTTPS. On my box, autocannon can produce more load than wrk and wrk2. Github: https://github.com/mcollina/autocannon 感兴趣的同学可以详细了解！ 常用参数 - c / NUM -连接 要使用的并发连接数。默认值:10。 - p /全国矿工工会——流水线 要使用的流水线请求的数量。默认值:1。 - d /——持续秒 自动加农炮运行的秒数。默认值:</description>
    </item>
    
    <item>
      <title>Markdown各种技巧试验</title>
      <link>https://chende.ren/2020/10/02215703-md-skill.html</link>
      <pubDate>Fri, 02 Oct 2020 21:57:03 +0800</pubDate>
      
      <guid>https://chende.ren/2020/10/02215703-md-skill.html</guid>
      <description>Alice-&amp;gt;Bob: Hello Bob, how are you? Note right of Bob: Bob thinks Bob--&amp;gt;Alice: I am good thanks! st=&amp;gt;start: Start op=&amp;gt;operation: Your Operation cond=&amp;gt;condition: Yes or No? e=&amp;gt;end st-&amp;gt;op-&amp;gt;cond cond(yes)-&amp;gt;e cond(no)-&amp;gt;op digraph G { subgraph cluster_0 { style=filled; color=lightgrey; node [style=filled,color=white]; a0 -&amp;gt; a1 -&amp;gt; a2 -&amp;gt; a3; label = &amp;quot;process #1&amp;quot;; } subgraph cluster_1 { node [style=filled]; b0 -&amp;gt; b1 -&amp;gt; b2 -&amp;gt; b3; label = &amp;quot;process #2&amp;quot;; color=blue } start -&amp;gt; a0; start -&amp;gt; b0; a1 -&amp;gt; b3; b2 -&amp;gt; a3; a3 -&amp;gt; a0; a3 -&amp;gt; end; b3 -&amp;gt; end; start [shape=Mdiamond]; end [shape=Msquare]; }</description>
    </item>
    
    <item>
      <title>为什么要开通个人网站</title>
      <link>https://chende.ren/2020/10/01215703-why-open-blog.html</link>
      <pubDate>Thu, 01 Oct 2020 21:57:03 +0800</pubDate>
      
      <guid>https://chende.ren/2020/10/01215703-why-open-blog.html</guid>
      <description>2020年是非同寻常的一年&amp;hellip; 2019年年末突如其来的疫情，让我感觉一切都变了，可能和我家乡湖北有些关系，现在回头看简直或多或少影响了世界历史的进程。一切都在迅速的演变， 我也必须要有些积极变化了&amp;hellip; 已经毕业这么多年，不管是工作还是生活，经历了很多事，学到了不少东西；有很多记录型的文字都躺在硬盘中&amp;hellip; 于是</description>
    </item>
    
    <item>
      <title>About me</title>
      <link>https://chende.ren/about/me.html</link>
      <pubDate>Thu, 01 Oct 2020 09:59:59 +0800</pubDate>
      
      <guid>https://chende.ren/about/me.html</guid>
      <description>自我介绍： 欢迎来到闪电侠的个人网站。 chende.ren 联系方式： 微信号：qinchende QQ群：674888395（闪电侠俱乐部） Github：github.com/qinchende 声明： 本站文章多为原创或者网络资料摘录整理（附参考网址），仅代表个人思想，与其他任何人或组织无关！ 如果你认为我的文章对你有帮助，欢迎将本站推荐给你的小伙伴！ 除特别标示之外</description>
    </item>
    
    <item>
      <title>归档</title>
      <link>https://chende.ren/archives/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://chende.ren/archives/</guid>
      <description></description>
    </item>
    
    <item>
      <title>搜索</title>
      <link>https://chende.ren/search/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://chende.ren/search/</guid>
      <description></description>
    </item>
    
  </channel>
</rss>
