作者: Windfarer
原文: Via
我们在微服务框架kratos v2的默认项目模板中kratos-layout使用了google/wire进行依赖注入,也建议开发者在维护项目时使用该工具。
Author: Tiago Ilieve
Via: Here
Recently, I was talking to a long-time friend, previous university colleague and former boss, who mentioned the fact that Redis was failing to persist data to disk in low memory conditions. For that reason, he advised to never let a Redis in-memory dataset to be bigger than 50% of the system memory. Thinking about how wasteful that practice would be, it’s interesting to understand why this can happen and look for alternatives to assure that Redis will be able to use as much memory as there’s available to it, without sacrificing its durability.
最近研究如何实时的通过rsync传输日志文件,找到下面的文章,很详细。
在开始分析算法原理之前,简单说明下rsync的增量传输功能。
假设待传输文件为A,如果目标路径下没有文件A,则rsync会直接传输文件A,如果目标路径下已存在文件A,则发送端视情况决定是否要传输文件A。rsync默认使用"quick check"算法,它会比较源文件和目标文件(如果存在)的文件大小和修改时间mtime,如果两端文件的大小或mtime不同,则发送端会传输该文件,否则将忽略该文件。
一朋友刚到漂亮国的前几天,因没提前准备当地的电话卡,网申又需要好几天,而他又需要买买买,我给他推荐了google voice,又因为自己是键盘出国,当使用时才发现别人呼叫进来的全进了语音信箱,遂研究解决方案并记录一下。
在阿里云 ECS 上自建k8s时,除自行配置Nginx对外提供服务外,还可以使用阿里云官方的CNI插件Terway以及CCM 使用SLB对外提供服务,本文主要介绍该方式