Alibaba's internal launch of spring cloud full set of microservice architecture notes to meet the interviewer!

One - Programmer 2020-11-07 16:54:31
alibaba internal launch spring cloud


from spring To SpringBoot Until then SpringCloud, Now? “ Interview to build rocket 、 Screw in ” From the history of the development of micro services, it can be shown incisively and vividly , Except for big Internet companies like Ali , Rarely used SpringCloud, But you have to learn , Because you go out for an interview and you'll find , The interview will be asked !

see , Recently, Ali launched a set of internal SpringCloud note ( Four copies in total ) covers SpringCloud All the technical content of , At the same time, it also includes the interview hot spots ( I don't know if Ali intended to ......) To make a long story short , From every dimension , It's all a rare note !

Let's share this note for free , Limited by the length of the article , The editor can only show you part of the content , complete PDF The free access to the full-color version is at the end of the article !

Let's get to the point !

DAY1: Micro service Basics

SpringCloud summary

Case building

Distributed system using microservice architecture communicates with each other through network . We describe the calling relationship between microservices through service providers and service consumers .

Service providers : The callee of the service , The party that provides the calling interface

Serving consumers : The caller of the service , The party that relies on other services

We take e-commerce system as an example , The user initiates a purchase request to the order microservice . Before saving the order, you need to call the commodity microservice to query the current commodity inventory , Unit price and other information . In this case , Order micro service is a service consumer , Commodity micro service is a service provider .

Service registration Eureka Basics

Service registration Eurek senior

Eureka Alternative Consul

The service call Ribbon introduction

After the above learning , Service registration and service discovery have been implemented . When you start a service , Can pass HTTP To register information in the registry , And through SpringCloud Provides a tool to get a list of Registry Services . But there are still many problems in the call between services , How to call microservices more conveniently , How to choose multiple micro service providers , How to load balance and so on .

The service call Ribbon senior

DAY2: The service call Feign、 Service registration and discovery summary 、 The high concurrency problem of microservice architecture

Through the registry, we have realized the service registration and service discovery of microservices , And through Ribbon Load balancing is realized , Has been aided by Feign Microservices can be called gracefully . So what about the performance of the microservices we wrote , Is there a problem ?

Service failure Hystrix And alternatives

18 end of the year Ntflix Official announcement Hystrix It's stable enough , No longer actively developing Hystrix , The project will be in maintenance mode . For now Hystrix It's more stable , also Hystrix Just stop developing new versions , It's not a complete stop to maintenance , Bug What will still be maintained . So in the short term , Hystrix Still in use . But in the long run , Hystrix It will always reach its life cycle , that Spring Cloud Is there any alternative product in the ecology ?

DAY3: Overview of microservice gateway

After learning the previous knowledge , Microservice architecture has taken shape . But there are still some problems : Different microservices - There will be different network addresses , The client must remember dozens or even hundreds of addresses when accessing these microservices , This is too complex for the client side and difficult to maintain . Here's the picture :

Microservice gateway Zuul

Microservice gateway GateWay

Zuul 1.x It's based on blocking I0 Of API Gateway as well as Servlet; until 2018 year 5 month , Zuul2.x( be based on Netty , It's also non blocking , Supports long connections ) Just released , but Spring Cloud There are no plans for integration yet .Spring CloudGateway Than Zuul 1.x The performance and function of the series are better as a whole .

Overview of microservice link tracking

In actual enterprise development , Message middleware is one of the most important components -. Message middleware mainly solves application decoupling , Asynchronous messaging , Flow cutting , Achieve high performance , High availability , Scalable and ultimately - The structure of causation . Different middleware, its implementation way , The internal structure is different . As is common RabbitMQ and Kafka, Due to the differences in the architecture of the two message oriented middleware , image RabbitMQ Yes exchange , kafka Yes Topic , partitions Partition , The differences of these middleware lead to our actual project development, which has caused us some difficulties , If we use one of the two message queues , The business requirements behind , I want to go to another - - Migration of message queues , There is no doubt that this is a disaster , A lot of things have to be pulled down and redone , Because it's coupled to our system , Now springc loud stream It gives us a way to decouple .

DAY4:Spring Cloud Stream

Spring Cloud Conig

Open source configuration center Apollo

100% Free access : Forward this article ( Sorting is not easy to )+ Pay attention to me , Then scan the code and get it for free !

版权声明
本文为[One - Programmer]所创,转载请带上原文链接,感谢

  1. 【计算机网络 12(1),尚学堂马士兵Java视频教程
  2. 【程序猿历程,史上最全的Java面试题集锦在这里
  3. 【程序猿历程(1),Javaweb视频教程百度云
  4. Notes on MySQL 45 lectures (1-7)
  5. [computer network 12 (1), Shang Xuetang Ma soldier java video tutorial
  6. The most complete collection of Java interview questions in history is here
  7. [process of program ape (1), JavaWeb video tutorial, baidu cloud
  8. Notes on MySQL 45 lectures (1-7)
  9. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  10. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  11. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  12. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  13. 【递归,Java传智播客笔记
  14. [recursion, Java intelligence podcast notes
  15. [adhere to painting for 386 days] the beginning of spring of 24 solar terms
  16. K8S系列第八篇(Service、EndPoints以及高可用kubeadm部署)
  17. K8s Series Part 8 (service, endpoints and high availability kubeadm deployment)
  18. 【重识 HTML (3),350道Java面试真题分享
  19. 【重识 HTML (2),Java并发编程必会的多线程你竟然还不会
  20. 【重识 HTML (1),二本Java小菜鸟4面字节跳动被秒成渣渣
  21. [re recognize HTML (3) and share 350 real Java interview questions
  22. [re recognize HTML (2). Multithreading is a must for Java Concurrent Programming. How dare you not
  23. [re recognize HTML (1), two Java rookies' 4-sided bytes beat and become slag in seconds
  24. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  25. RPC 1: how to develop RPC framework from scratch
  26. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  27. RPC 1: how to develop RPC framework from scratch
  28. 一次性捋清楚吧,对乱糟糟的,Spring事务扩展机制
  29. 一文彻底弄懂如何选择抽象类还是接口,连续四年百度Java岗必问面试题
  30. Redis常用命令
  31. 一双拖鞋引发的血案,狂神说Java系列笔记
  32. 一、mysql基础安装
  33. 一位程序员的独白:尽管我一生坎坷,Java框架面试基础
  34. Clear it all at once. For the messy, spring transaction extension mechanism
  35. A thorough understanding of how to choose abstract classes or interfaces, baidu Java post must ask interview questions for four consecutive years
  36. Redis common commands
  37. A pair of slippers triggered the murder, crazy God said java series notes
  38. 1、 MySQL basic installation
  39. Monologue of a programmer: despite my ups and downs in my life, Java framework is the foundation of interview
  40. 【大厂面试】三面三问Spring循环依赖,请一定要把这篇看完(建议收藏)
  41. 一线互联网企业中,springboot入门项目
  42. 一篇文带你入门SSM框架Spring开发,帮你快速拿Offer
  43. 【面试资料】Java全集、微服务、大数据、数据结构与算法、机器学习知识最全总结,283页pdf
  44. 【leetcode刷题】24.数组中重复的数字——Java版
  45. 【leetcode刷题】23.对称二叉树——Java版
  46. 【leetcode刷题】22.二叉树的中序遍历——Java版
  47. 【leetcode刷题】21.三数之和——Java版
  48. 【leetcode刷题】20.最长回文子串——Java版
  49. 【leetcode刷题】19.回文链表——Java版
  50. 【leetcode刷题】18.反转链表——Java版
  51. 【leetcode刷题】17.相交链表——Java&python版
  52. 【leetcode刷题】16.环形链表——Java版
  53. 【leetcode刷题】15.汉明距离——Java版
  54. 【leetcode刷题】14.找到所有数组中消失的数字——Java版
  55. 【leetcode刷题】13.比特位计数——Java版
  56. oracle控制用户权限命令
  57. 三年Java开发,继阿里,鲁班二期Java架构师
  58. Oracle必须要启动的服务
  59. 万字长文!深入剖析HashMap,Java基础笔试题大全带答案
  60. 一问Kafka就心慌?我却凭着这份,图灵学院vip课程百度云