人人可写微服务框架

如果无法正常显示,请先停止浏览器的去广告插件。
分享至:
1.
2. 人人可写微服务框架 晁岳攀 / 鸟窝
3. 个人介绍 • 微服务框架rpcx作者 • 《Go并发编程实战课》专栏作者 • 《Scala集合开发手册》作者 • Go语言布道师 • 二十余年的开发、架构经验
4. 一、微服务架构?
5. 微服务 vs 单体应用 单体程序 微服务
6. 微服务的好处 • 适合大型公司和大规模应用,利用团队自治 • 服务较小易于开发和维护 • 易于扩展和迭代 • 更好的容错性 • 可以持续部署和持续交付 • 可以独立部署,适合当前云服务架构
7. 微服务的坏处 • 微服务的拆分不是一件容易的事 • 很高的复杂性,测试和部署都变得很困难 • 部署跨多个微服务的功能的时候协调起来很困难 • 何时引入微服务架构是个难题
8. 二、大厂中的微服务框架
9. 国内 dubbo: https://dubbo.apache.org/ (阿里巴巴) motan: https://github.com/weibocom/motan (微博) rpcx: https://rpcx.io (好未来学而思、新浪、马蜂窝) tars: https://github.com/tars/tars (腾讯) brpc: https://github.com/apache/incubator-brpc (百度) sofa: https://github.com/sofastack/sofa-rpc (蚂蚁金服) srpc: https://github.com/sogou/srpc (搜狗) kratos: https://github.com/go-kratos/kratos (bilibili) odin: https://github.com/tal-tech/odin (学而思) go-zero:https://github.com/tal-tech/go-zero (好未来晓黑板) Jupiter: http://github.com/douyu/jupiter (斗鱼)
10. 国外 grpc: https://grpc.io/ (谷歌) thrif t: https://thrif t.apache.org/ (facebook) springcloud: https://spring.io/projects/spring- cloud go-micro: https://github.com/asim/go-micro go-kit: https://gokit.io/ twirp: https://github.com/twitchtv/twirp (twitchtv)
11. 三、微服务框架 基于开发微服务框架rpcx的思考
12. 微服务框架
13. 通讯协议(protocol) • 协议和transport决定的微服务框架的架构和性能
14. 通讯协议(protocol) • 协议和transport决定的微服务框架的架构和性能
15. 传输(transport) • 传输协议决定了框架的功能和性能
16. 传输(transport) • 传输协议决定了框架的功能和性能 HTTP 1.1 HTTP 2.0 raw TCP UDP Ø QUIC Ø KCP
17. 服务发现/注册中心 • 各种服务中心及其优缺点 • • • • • zookeeper etcd consul nacos database • redis • dns • 如何设计以便支持各种注册中心、以及未来可能的支持?
18. ri f t nc o de r ji Co go 编解码 序列化/反序列化性能 Marshal Unmarshal 4000 3500 3000 2500 2000 1500 1000 500 0
19. Bu Th jiC o r ji U bytes 编解码 250 序列化后大小 200 150 100 50 0
20. 调用之同步/异步 • 阻塞式调用(sync) • 异步模式(async) • Fork • Broadcast
21. 服务治理之容错模式 • Failfast • Failover • Failretry • Failbackup
22. 服务治理之路由 • 随机选择 • 轮询 • 一致性哈希 • 基于权重的平滑轮询 • 网络质量优先 • 地理位置优先 • 自定义路由
23. 服务治理之保活 • 超时 • 心跳 • 限流 • 降级 • 熔断
24. 可观察性 • log • metrics • trace • • • • • • Google Dapper OpenTracing/OpenCensus ->opentelemetry Zipkin (twitter) Jaeger (uber) Appdash (sourcegraph) 鹰眼
25. 服务治理之安全 • 身份认证 • 葫芦娃攻击 • TLS • 黑名单/白名单
26. 四、更高级的微服务框架
27. 双向通讯 • 超越 client/server模式
28. 多协议支持 • 跨语言的困境 • http • websocket • JSON-RPC2
29. 易用性 • 大部分的rpc框架实现的问题 • 配置复杂 • 开发复杂 • 私货太多
30. 代码生成
31.

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.125.1. UTC+08:00, 2024-05-18 09:31
浙ICP备14020137号-1 $访客地图$