Elasticsearch 是什么 Elasticsearch(ES) 是一个 Lucene 构建的开源,分布式,RESTful 接口全文搜索引擎. 还是一个分布式文档数据库, 其中每个字段均是被索引的数据且可被搜索,它能
Elasticsearch 入门(四) 查询
概要 Elasticsearch对外提供的API遵循REST原则 GET POST PUT DELETE 简介 _index 索引, 文档在哪儿存放 _type 类型, 7.x以后都使用 _doc类型 _id 文档唯
Redis 配置
配置文件目录 以上是常见的redis存放目录 1 2 vim /etc/redis.conf vim /etc/redis/6379.conf 启动配置 1 2 3 4 5 6 7 8 9 10 11 # 后台运行: yes 是, no 不是 daemonize yes # 提供服务的端口 port 6379 # 对外提
Tcp/Ip
什么是TCP/IP 什么网络协议 网络协议是一组用于网络上的计算机(或其他设备)之间通信的规则和数据格式的集合. TCP/IP 在internel和很多其他网
Cobra使用说明
Cobra 概念 Cobra有三个基本概念commands,arguments和flags。 commands代表行为 arguments代表数值 flags
Ab 压测
ab 简单使用 并发100, 请求数为1000次. 1 ab -c 100 -n 1000 http://localhost/test.html ab post json使用 -p 数据 -T 请求内容格式, 如json: application/json 1 ab -c 100 -n 1000 -p data.json -T application/json http://localhost/1.html data.json 1 {"username":"sgfoot.com"} 解读
Linux 命令集
文件类 查看文件大小 1 2 3 4 5 # 加 h 查看可读性的文件大小 ll -h # 查看文件夹大小 # --max-depth=1 表示查看文件夹的一层 du -h --max-depth=1 /usr 压缩 ZIP -r 递归处理,将指定目录下的所
zerolog 占大量内存剖析
分析过程 使用 pprof top分析 可见 json.Marshal占第一内存. 为什么呢? 我们进一步分析 使用 tree 分析 查看到 zerolog AppendInterface 方法占用 73.32%的内存量. 而
Url Values Opimize
Redis 性能分析
查看 Clients 属性 1 127.0.0.1:6379>info clients 1 2 3 4 5 # Clients connected_clients:1 # 已连接客户端的数量(不包括通过从属服务器连接的客户端) client_recent_max_input_buffer:2 # 当前连接的客户端当中,最长的输出列表 client_recent_max_output_buffer:0 # 当前连接