04 2019 档案

摘要:spring security oauth2 客户端四种授权模式: 授权码模式(authorization code): 第三方应用先申请一个授权码,然后再用该码获取令牌。 简化模式(implicit) 密码模式(resource owner password credentials) 客户端模式( 阅读全文
posted @ 2019-04-30 11:14 zuier~ 阅读(2516) 评论(0) 推荐(0)
摘要:Spring Cloud Gateway is built upon "Spring Boot 2.0" , "Spring WebFlux" , and "Project Reactor" . As a consequence many of the familiar synchronous li 阅读全文
posted @ 2019-04-26 20:43 zuier~ 阅读(3706) 评论(0) 推荐(0)
摘要:较低级别的服务中的服务故障可能导致级联故障一直到用户。 当对特定服务的调用超过circuitBreaker.requestVolumeThreshold(默认值:20个请求)且失败百分比大于circuit.rolllingStats.timeInMilliseconds定义的滚动窗口中的circui 阅读全文
posted @ 2019-04-25 14:02 zuier~ 阅读(2836) 评论(0) 推荐(0)
摘要:服务生产,消费,调用 阅读全文
posted @ 2019-04-23 16:18 zuier~ 阅读(967) 评论(0) 推荐(0)
摘要:java.lang.String com.zuizui.cloud.feign.feign.ProviderClient.port() to {[/api/v1/provider/port],methods=[GET]}: There is already 'providerClient.ProviderClientFallback' bean method 阅读全文
posted @ 2019-04-23 14:49 zuier~ 阅读(1147) 评论(0) 推荐(0)
摘要:RabbitMQ 1、RabbitMQ环境:略 2、每个服务都添加依赖,或者聚合工程中统一添加 org.springframework.boot spring boot starter actuator org.springframework.cloud spring cloud starter b 阅读全文
posted @ 2019-04-22 18:54 zuier~ 阅读(406) 评论(0) 推荐(0)
摘要:setup a "Config Server" and then build a client that consumes the configuration on startup and then refreshes the configuration without restarting the 阅读全文
posted @ 2019-04-22 16:18 zuier~ 阅读(422) 评论(0) 推荐(0)
摘要:概要 You’ll setup a "Netflix Eureka service registry" and then build a client that both registers itself with the registry and uses it to resolve its ow 阅读全文
posted @ 2019-04-22 10:48 zuier~ 阅读(658) 评论(0) 推荐(0)
摘要:异常 原因 log: Redis持久化异常,bgsave时会fock主进程持久化。内存需求 2,内存不足报错 解决 1、先让程序不报错,客户端执行:config set stop writes on bgsave error no 2、修改系统变量:/etc/sysctl.conf增加配置:vm.o 阅读全文
posted @ 2019-04-06 14:23 zuier~ 阅读(249) 评论(0) 推荐(0)
摘要:开放远程连接 CentOS7 1、redis非本机要开放远程连接端口和配置 Jedis连接 依赖 单节点: 连接池 sentinel 集群 springboot redis 依赖 单节点使用 配置 配置类 使用 缓存使用 service接口 service实现 cluster 集群 配置:appli 阅读全文
posted @ 2019-04-03 13:50 zuier~ 阅读(438) 评论(0) 推荐(0)
摘要:Redis Cluster 需求:1、请求量过大 100w/s 2、数据量大 1、数据分布 哈希分布特点: 数据分散度高 键值分布业务无关 无法顺序访问 支持批量操作 顺序分布特点: 数据分散度易倾斜 键值业务相关 可顺序访问 支持批量操作 2、数据分区 节点取余分区特点: 客户端分片:哈希 + 取 阅读全文
posted @ 2019-04-03 11:48 zuier~ 阅读(1422) 评论(0) 推荐(0)
摘要:主从复制 数据副本 扩展读性能 一个master可以有多个slave 一个slave只能有一个master 数据流只能从mater流向slave slaveof命令式复制: 配置复制: 1、主从复制demo 拷贝配置文件: 配置从节点: 启动服务: 测试: 主节点 从节点 Redis Sentine 阅读全文
posted @ 2019-04-03 11:40 zuier~ 阅读(714) 评论(0) 推荐(0)
摘要:1、慢查询 配置: 1. slowlog max len 1. 先进先出队列 2. 固定长度 3. 保存在内存内 2. slowlog log slower than 1. 慢查询阀值(单位:微妙) 2. slowlog log slower than = 0:所以慢查询都记录 获取: 1、slow 阅读全文
posted @ 2019-04-03 11:34 zuier~ 阅读(158) 评论(0) 推荐(0)
摘要:1、String 1、set/get 2、mget:获取多个key值 3、incr && incrby:自增操作 / 增加指定值 4、decr && decry:自减 / 减指定值 5、setnx 【set if not exist】:如果不存在则设置该值,返回1,否则不设置,返回0 6、setex 阅读全文
posted @ 2019-04-03 11:26 zuier~ 阅读(193) 评论(0) 推荐(0)
摘要:基本 内存 + 持久化数据库 数据类型:字符串,列表,集合,散列表,有序集合 应用场景:发布/订阅,队列,主从复制,动态扩容,脚本操作,持久化 优点:没有Schame约束,数据结构变更容易,抗压能力强,性能极高 缺点:没有索引,没有外键,缺少int/date等基本数据类型,多条件查询需要通过内联集合 阅读全文
posted @ 2019-04-03 11:10 zuier~ 阅读(2000) 评论(0) 推荐(0)