当前位置:网站首页>一个公司的面试笔记
一个公司的面试笔记
2022-07-29 04:08:00 【thoughtCodes】
最近感觉面试的机会少了,加上一家公司的面试:
1.简历问题,大概的职业经历
2.最近的项目,
设计的微服务的架构划分,模块:
流程,模块实现以及遇到的问题,你是如何解决的?
3.高可用是怎么做的?
4.源码分析这块是怎么做的?
5.openFeign 的源码实现逻辑
6.规范实现:
jsr 352批处理的实现
7.JVM调优的实现
8.新技术,学习的实现
9.数据库实践和岗位职业发展。
10.最后的总结:
微服务架构模式和重构之类的。
========》 以下为自己不会的地方:
1.常用的模型分类有两种:
时间模型
桶模型
令牌桶算法的原理是系统会以一个恒定的速度往桶里放入令牌,而如果请求需要被处理,则需要先从桶里获取一个令牌,当桶里没有令牌可取时,则拒绝服务。不过令牌桶还是允许一定程度的突发传输,这样解决了在实际上的互联网应用中,流量经常是突发性的问题。
漏桶算法思路很简单,如下图(图片来源网络),水(请求)先进入到漏桶里,漏桶以一定的速度出水,当水流入速度过大会直接溢出,可以看出漏桶算法能强行限制数据的传输速率。
简单的说: 调用方只能严格按照预定的间隔顺序进行消费调用。
Ref: https://en.wikipedia.org/wiki/Leaky_bucket
哨兵模式:
Sentinel (分布式系统的流量防卫兵) 是阿里开源的一套用于服务容错的综合性解决方案。它以流量为切入点, 从流量控制、熔断降级、系统负载保护等多个维度来保护服务的稳定性。
Sentinel 承接了阿里巴巴近 10 年的双十一大促流量的核心场景, 例如秒杀(即突发流量控制在系统容量可以承受的范围)、消息削峰填谷、集群流量控制、实时熔断下游不可用应用等。
Sentinel核心分成两个部分
核心库(java客户端):能够运行于所有 Java 运行时环境,同时对Dubbo /Spring Cloud 等框架也有较好的支持。
控制台(Dashboard):基于spring boot开发,打包以后直接运行
2.jsr 352 模型:
JSR-352是java批处理的新规范。受Spring Batch的深度影响,该规范提供了Spring Batch已经存在的相关功能。Spring Batch 3.0已实现该规范,支持遵循标准定义批处理任务了。使用JSR-352 的任务规范语言(JSL)配置一个批处理任务,代码如下:
Spring Batch Integration 曾经是 Spring Batch Admin 项目的子模块。Spring Batch的Spring Integration提供了更好整合能力的功能。这些特殊功能包括:
3.jvm stack/参数配置:
相同值的好处
面对上面的问题,为了避免在生产环境由于heap内存扩大或缩小导致应用停顿,降低延迟,同时避免每次垃圾回收完成后JVM重新分配内存。所以,-Xmx和-Xms一般都是设置相等的。
4.源码分析:
Spring Cloud OpenFeign 的核心工作原理经上文探究可以非常简单的总结为:
通过 @EnableFeignCleints 触发 Spring 应用程序对 classpath 中 @FeignClient 修饰类的扫描
解析到 @FeignClient 修饰类后, Feign 框架通过扩展 Spring Bean Deifinition 的注册逻辑, 最终注册一个 FeignClientFacotoryBean 进入 Spring 容器
Spring 容器在初始化其他用到 @FeignClient 接口的类时, 获得的是 FeignClientFacotryBean 产生的一个代理对象 Proxy.
基于 java 原生的动态代理机制, 针对 Proxy 的调用, 都会被统一转发给 Feign 框架所定义的一个 InvocationHandler , 由该 Handler 完成后续的 HTTP 转换, 发送, 接收, 翻译HTTP响应的工作。
5.微服务架构模式和设计模式的使用:
业务的代码重构的博弈吧
边栏推荐
- Change the value of the argument by address through malloc and pointer
- How to solve the problem of store ranking?
- 通过PWM呼吸灯和PWM控制直流电机来详细介绍TIM的输出比较功能
- "Weilai Cup" 2022 Niuke summer multi school training camp 2H
- LCA board
- Zhihuijun, a genius of Huawei, made a modular mechanical keyboard, which caused an earthquake in the geek circle. Netizens: This is the real customization
- Configmap configuration and secret encryption
- Array as function parameter -- pointer constant / constant pointer
- Basic configuration of BGP - establish peers and route announcements
- 安装ros的laser_scan_matche库所遇到的问题(一)
猜你喜欢
Simple cases of inner connection and left connection
Zhihuijun, a genius of Huawei, made a modular mechanical keyboard, which caused an earthquake in the geek circle. Netizens: This is the real customization
力扣面试题17.04 消失的数字||260.只出现一次的数字(内含位运算知识点)
【BGP】小型实验
关于双指针的思想总结
Some problems about pointers
Three tier architecture of enterprise network
Lua language (stm32+2g/4g module) and C language (stm32+esp8266) methods of extracting relevant data from strings - collation
Note: restframe work records many to one tables, how to serialize in that table (reverse query)
Const char* and char*, string constants
随机推荐
Array as function parameter -- pointer constant / constant pointer
淘宝商品详情接口(商品详情页面数据接口)
STM32F103ZET6程序移植为C8T6+C8T6下载程序flash timeout的解决方案
Asp.net MVC中文件夹中的控制器如何跳转到根目录的控制器中?
Three tier architecture of enterprise network
After I get the winfrom specific control ID from the database, I need to find the corresponding control through this ID and assign a value to the text text of the control. What should I do
[untitled]
pat A1041 Be Unique
How to execute insert into select from job in SQL client
力扣面试题17.04 消失的数字||260.只出现一次的数字(内含位运算知识点)
Don't the JDBC SQL connector of the big guys Flink now support all databases, such as vertica?
Lua语言(stm32+2G/4G模块)和C语言(stm32+esp8266)从字符串中提取相关数据的方法-整理
Asp. Net MVC, how can the controller in the folder jump to the controller in the root directory?
有没有大佬帮我看下flink sql连接kafka认证kerberos的参数配置是否有误
First knowledge of C language (3)
C language to achieve three chess game (detailed explanation)
SQL server当存储过程接收的参数是int类型时,如何做判断?
Typescript from getting started to mastering (XXII) namespace namespace (I)
The structure pointer must be initialized, and the pointer must also be initialized
C语言实现三子棋游戏(详解)