Redis

自学七天,我是如何通过软考系统架构师

故事扮演 提交于 2020-12-24 13:20:58
此文Mac分风格阅读链接:https://mp.weixin.qq.com/s/WWohgIH96zoOhTkGAhv1bQ 前言 软考复习的方式可以分为两种:报班和自学。当然也有加QQ要求共同分摊网课费用的,当然被我义正言辞地无情拒绝。原因很简单:没钱。于是前前后后自学了七天,最终考过了系统架构师。或许我的学习模式不适合你,但至少会让你少走很多弯路。 首先晒一下成绩,开心的一批,虽然考的不是很好!!每科满分75,需要同时都>=45分才算合格。 软考初衷 2020,感觉要改变一下自己。毕业两年没考过证书,百度了一下了解到软考,于是脑子一热就报了个高级软件架构师,反正报名费都一样。在网上搜了搜前辈们的经验,说是留出一个月复习时间就足够了,报完名就放在一边了。 10月8日国庆假期结束,还有整整一个月的复习时间。可不巧的是,我是拖延症晚期,从30天复习时间缩减到20天,再缩减到到15天。然后参加了两场婚礼结婚过去了5天,公司系统升级又通宵了2天,一转眼就十月底了。最后只有7天时间可以复习。最后抱着破釜沉舟,背水一战,乘风破浪、重在参与的心态决定挣扎自救一波。 资料篇 视频资料 工欲善其事必先利其器,没有资料还复习个锤子。在找资料这条路上我是做了很多无用功。因为个人的习惯偏向于视频学习,可是在B站找到了寥寥几个和架构师有关的学习视频。要不就是知识点覆盖不全面,要不就是讲的拖拖沓沓

How to receive Redis expire events with node?

感情迁移 提交于 2020-12-24 12:35:49
问题 I want to listen the expire events from Redis. I've configured on my redis.conf the notify-keyspace-events "AKE" and this is my code on node: const redis = require('redis'); const client = redis.createClient(); const subscriber = redis.createClient(); const KEY_EXPIRING_TIME = 10; // seconds client.setex('myKey', KEY_EXPIRING_TIME, 'myValue'); subscriber.on('message', function(channel, msg) { console.log( `On ${channel} received ${msg} event`); }); subscriber.subscribe('myKey', function (err)

How to receive Redis expire events with node?

青春壹個敷衍的年華 提交于 2020-12-24 12:35:22
问题 I want to listen the expire events from Redis. I've configured on my redis.conf the notify-keyspace-events "AKE" and this is my code on node: const redis = require('redis'); const client = redis.createClient(); const subscriber = redis.createClient(); const KEY_EXPIRING_TIME = 10; // seconds client.setex('myKey', KEY_EXPIRING_TIME, 'myValue'); subscriber.on('message', function(channel, msg) { console.log( `On ${channel} received ${msg} event`); }); subscriber.subscribe('myKey', function (err)

How to receive Redis expire events with node?

六月ゝ 毕业季﹏ 提交于 2020-12-24 12:24:38
问题 I want to listen the expire events from Redis. I've configured on my redis.conf the notify-keyspace-events "AKE" and this is my code on node: const redis = require('redis'); const client = redis.createClient(); const subscriber = redis.createClient(); const KEY_EXPIRING_TIME = 10; // seconds client.setex('myKey', KEY_EXPIRING_TIME, 'myValue'); subscriber.on('message', function(channel, msg) { console.log( `On ${channel} received ${msg} event`); }); subscriber.subscribe('myKey', function (err)

How to receive Redis expire events with node?

半腔热情 提交于 2020-12-24 12:22:36
问题 I want to listen the expire events from Redis. I've configured on my redis.conf the notify-keyspace-events "AKE" and this is my code on node: const redis = require('redis'); const client = redis.createClient(); const subscriber = redis.createClient(); const KEY_EXPIRING_TIME = 10; // seconds client.setex('myKey', KEY_EXPIRING_TIME, 'myValue'); subscriber.on('message', function(channel, msg) { console.log( `On ${channel} received ${msg} event`); }); subscriber.subscribe('myKey', function (err)

How to receive Redis expire events with node?

女生的网名这么多〃 提交于 2020-12-24 12:20:14
问题 I want to listen the expire events from Redis. I've configured on my redis.conf the notify-keyspace-events "AKE" and this is my code on node: const redis = require('redis'); const client = redis.createClient(); const subscriber = redis.createClient(); const KEY_EXPIRING_TIME = 10; // seconds client.setex('myKey', KEY_EXPIRING_TIME, 'myValue'); subscriber.on('message', function(channel, msg) { console.log( `On ${channel} received ${msg} event`); }); subscriber.subscribe('myKey', function (err)

How to receive Redis expire events with node?

巧了我就是萌 提交于 2020-12-24 12:17:15
问题 I want to listen the expire events from Redis. I've configured on my redis.conf the notify-keyspace-events "AKE" and this is my code on node: const redis = require('redis'); const client = redis.createClient(); const subscriber = redis.createClient(); const KEY_EXPIRING_TIME = 10; // seconds client.setex('myKey', KEY_EXPIRING_TIME, 'myValue'); subscriber.on('message', function(channel, msg) { console.log( `On ${channel} received ${msg} event`); }); subscriber.subscribe('myKey', function (err)

windows下搭建Redis集群

本秂侑毒 提交于 2020-12-24 10:41:42
一、环境准备 在windows下搭建redis集群需要先安装ruby运行环境,可以到 ruby官方网站 下载。 新建一个文件夹,名称为 redis_ cluster ,即redis集群。 在 redis_ cluster 文件夹下新建 9000,9001,9002,9003,9004,9005 六个文件夹。 拷贝redis安装目录下的文件分别拷贝到``9000,9001,9002,9003,9004,9005`六个文件夹下。 在六个文件夹下建立一个 start.bat 文件,用来启动redis server,写入以下内容: title redis-9000 #9000为redis实例使用的端口号,根据实际修改 redis-server.exe redis.windows.conf pause 分别删除每个文件夹下redis原来的数据文件 dump.rdb 。 二、修改配置文件 修改 9000 文件夹下的 redis.windows.conf 配置文件的以下几项,注意顶格写,前面不能有空格。 port 9000 cluster-enabled yes cluster-config-file nodes.conf cluster-node-timeout 15000 appendonly yes 其它5个文件夹同样修改以上几项,port修改为对应的端口号。 打开命令行执行 gem

Windows下Redis集群搭建

好久不见. 提交于 2020-12-24 09:44:25
1、第一步先安装Redis 参照<Windows下Redis安装及使用.docx> 在Redis目录E:/Redis下新建Logs文件夹,并且创建3个端口下的配置文件,记得修改里面的接口 (配置文件来启动3个不同的Redis实例,由于Redis默认端口为6379,所以这里使用了6380、6381、6382来运行3个Redis实例) X修改配置文件 port 6380 loglevel notice logfile "D:/Redis/Logs/redis6380_log.txt" appendonly yes appendfilename "appendonly.6380.aof" cluster-enabled yes cluster-config-file nodes.6380.conf cluster-node-timeout 15000 cluster-slave-validity-factor 10 cluster-migration-barrier 1 cluster-require-full-coverage yes 参数解释: port 6380 #端口号 loglevel notice #日志的记录级别,notice是适合生产环境的 logfile "Logs/redis6380_log.txt" #指定log的保持路径,默认是创建在Redis安装目录下

Windows下 搭建redis集群

此生再无相见时 提交于 2020-12-24 09:43:55
Windows下搭建redis集群教程 一,redis集群介绍 Redis cluster(redis集群)是在版本3.0后才支持的架构,和其他集群一样,都是为了解决单台服务器不够用的情况,也防止了主服务器宕机无备用服务器,多个节点网络互联数据共享,所有节点都是一主一从(也可以一主多从),其中不提供服务,只做为备份,emmm我就不多说废话了,直接进入主题。 没有多的服务器就只能单机搭建集群了 二,所需软件环境 1,下载redis最新版本(版本必需要3.0以上) 下载地址: https://github.com/MSOpenTech/redis/releases 下载 Redis-x64-3.2.100.zip 安装在C盘中 redis入门教程: redis入门安装教程 2,安装Ruby语言运行环境 http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.4-x64.exe 安装到C盘中 选中3个,然后点击安装 安装好后会弹出一个黑色窗体,随后需要对Ruby进行配置,执行 gem install redis 先不要关闭 三,教程开始 1,在redis目录下创建6个节点的文件夹:7000-7005 2,将redis下面的文件复制到节点文件夹下面(其他的也是这样操作) 3,修改6个文件夹下redis.windows