Shredded Ultimate Encyclopedia of architecture: distributed open-source framework + + + micro-service performance optimization, enough?

Shredded Ultimate Encyclopedia of architecture: distributed open-source framework + + + micro-service performance optimization, enough?

A cat Tom 4 hours ago

Zero fragmented before finishing off some of the topics for everyone to refer to the study, this time to a one-off Shredded Ultimate Encyclopedia of architecture, includes open-source framework, distributed, micro-services, performance optimization and other four major topics were 17 small topics , all the side pot, to give everyone learning together -

Note: You need the full version of all architecture can answer Daquan [ "click me" to receive free]

 

"Shredded Ultimate Encyclopedia of architecture: distributed open-source framework + + + micro-service performance optimization, enough? "

01 open source frameworks (Spring + SpringMVC + Mybatis)

The answer open-source framework to resolve as follows:

 

1.1 Spring open source framework Shredded

  1. What is Spring Framework? What are the main module Spring framework?
  2. What are the benefits of using the Spring framework can bring?
  3. What is Inversion of Control (IOC)
  4. Please explain Spring framework IoC
  5. BeanFactory and ApplicationContext and what is the difference?
  6. There are several ways to configure Spring?
  7. How to configure Spring XML configuration-based approach
  8. How to configure a Java-based Spring configuration
  9. How to configure the same general approach Spring
  10. Please explain Spring Bean's life cycle?
  11. What is the difference between Spring Bean scopes?
  12. Singleton Beans Spring Framework is thread-safe it?
  13. Give an example of how to inject a Java Collection in Spring
  14. How to inject a Spring Bean in Java.util.Properties
  15. Please explain automatic assembly Spring Bean's?
  16. Please explain the difference between automatic assembly mode?
  17. How to open annotation-based automatic assembly?
  18. Please give examples explain @Required comment?
  19. Please give examples explain @Autowired comment?
  20. Please give examples @Qualifier comment?
  21. Constructor injection and setter injection What is the difference?
  22. What are the different types of events have the Spring framework?
  23. Spring Framework which are used in the design mode?

SpringMVC 1.2 Shredded open source framework

  1. What is SpringMvc?
  2. Spring MVC's advantages:
  3. SpringMVC works?
  4. SpringMVC process?
  5. SpringMvc controller is not a singleton, and if so, what is the problem, how to solve?
  6. If you have used struts2. SpringMVC and the difference between the simple introduction of struts2 What?
  7. Notes controller SpingMvc in general with that, there is no other alternative to comment?
  8. @RequestMapping notes used in the class above what effect?
  9. Like how to map a request to a specific method of the above?
  10. If intercept request, I would like to get intercepting method of submission, how to configure?
  11. How to get inside the method Request, or Session?
  12. I would like to get from the front desk parameters passed in a method to intercept it, how to get?
  13. If you have a number of parameters passed in the foreground, and these are the parameters of an object, then how to quickly get this object?
  14. SpringMvc the return value of the function what is?
  15. SpringMVC how to set redirection and forwarding?
  16. SpringMvc the front desk to transfer data from the background with what objects?
  17. SpringMvc There is a category to view and data are merged together, what is?
  18. How to put data into the Session ModelMap inside there?
  19. SpringMvc how AJAX and call each other?
  20. Speaking at the execution flow SpringMvc
  21. SpringMvc inside the interceptor is how to write?
  22. When a method returns a special object to AJAX, such as Object, List, etc., deal with what needs to be done?

1.3 Mybatis Shredded open source framework

  1. What is MyBatis?
  2. Speaking at the cache MyBatis
  3. How Mybatis is paged? What is the principle pagination plug-in?
  4. The operating principle outlined Mybatis plug-ins, as well as how to write a plugin?
  5. Mybatis dynamic sql is doing what? What are dynamic sql? Can briefly principle of dynamic sql execution is not?
  6. What is the difference between # {} and {} $ is?
  7. Why Mybatis semi-automatic ORM mapping tools? Where it differs is in automatic?
  8. Whether Mybatis support lazy loading? If so, what is its principle is to achieve?
  9. MyBatis with Hibernate What are the differences?
  10. What good is MyBatis?
  11. Brief Mybatis mapping relationship between the Xml mapping file and Mybatis internal data structures?
  12. What is MyBatis interface binding, and what are the benefits?
  13. There are several interface binding implementation, namely how to achieve?
  14. Under what circumstances bind with annotations, use xml binding under what circumstances?
  15. There are several ways to achieve MyBatis one? Specifically how to operate?
  16. Mybatis able to perform the associated one to one, one to many query anyway? What are the implementation, and the difference between them?
  17. Dynamic Sql MyBatis which is how the set? What syntax?
  18. Mybatis is how to execute sql package is the result of the target object and returns? What are mapping form?
  19. Xml mapping file, in addition to the common select | insert | updae | than delete the label, what label?
  20. When the field names in the entity class attribute name and the table is not the same, if the result of the query package to the specified pojo?
  21. Fuzzy query like how to write the statement
  22. Xml usually a mapping file, will write a corresponding interface to Dao, Dao's works, can overload?
  23. Mybatis mapping file, if the A label by reference to the content of B include labels, may I ask, Can I define B label at the back of the label A, or that A must be defined in the previous label?
  24. Mybatis of Xml mapping file, different Xml mapping file, id if you can repeat?
  25. Mybatis how to perform batch processing?
  26. What are Mybatis Executor executor? What is the difference between them?
  27. Mybatis how to specify which one to use Executor executor?
  28. Mybatis perform bulk insert, you can return the database primary key list it?
  29. Whether Mybatis can be mapped Enum enum class?
  30. How to get the automatically generated (master) key?
  31. How to pass multiple parameters in a mapper in?
  32. ResultType resultMap the difference?
  33. What are the requirements when using the MyBatis mapper interface call?
  34. What Mybatis larger than a few IBatis improvement?
  35. IBatis and MyBatis what are called core processing in class?
  36. IBatis and MyBatis differ in the details of what?

Open source framework (Spring + SpringMVC + Mybatis) answer to resolve finishing:

 

02 distributed (limiting + communication + database)

Distributed answer interpreted as follows:

 

2.1 Shredded distributed restrictor (Nginx + ZooKeeper)

(1) Shredded distributed limiting of Nginx

  1. Please explain what is Nginx?
  2. Please list some of the characteristics of x Nginx.
  3. Please list the differences between the x Nginx and Apache and
  4. Please explain how to handle the x Nginx P HTTP request.
  5. In the x Nginx, how to use an undefined server names to stop processing the request?
  6. Use "Reverse Proxy"
  7. Please list the best use of x Nginx server.
  8. Please explain what r Master and r Worker and processes on the x Nginx server are?
  9. Please explain how you turn Nginx through port 080 is different from that?
  10. Please explain whether it is possible to replace x Nginx error for the 2502 error?
  11. In the x Nginx, it is explained how to retain the double slash L URL??
  12. Please explain e ngx_http_upstream_module What is the role?
  13. Please explain what is K C10K problem?
  14. Please state what s stub_status and r sub_filter instruction and the role?
  15. X Nginx explain whether to support the request to the upstream compression?
  16. Explain how to get the current time in the x Nginx in?
  17. Explain what s -s ​​x Nginx server with the purpose of?
  18. Explain how to add modules on the x Nginx server?

(2) limiting the distributed Shredded ZooKeeper

  1. What ZooKeeper that?
  2. ZooKeeper provides what?
  3. Zookeeper File System
  4. Four types of znode
  5. Zookeeper notification mechanism
  6. Zookeeper did what?
  7. zk naming service (file system)
  8. zk configuration management (file system notification mechanism)
  9. Zookeeper Cluster Management (file system notification mechanism)
  10. Zookeeper distributed lock (file system notification mechanism)
  11. Distributed Lock acquisition process
  12. Zookeeper queue management (file system notification mechanism)
  13. Zookeeper data replication
  14. Zookeeper Works
  15. zookeeper 是如何保证事务的顺序一致性的?
  16. Zookeeper 下 Server 工作状态
  17. zookeeper 是如何选取主 leader 的?
  18. 分布式通知和协调
  19. 机器中为什么会有 leader?
  20. zk 节点宕机如何处理?
  21. Zookeeper 同步流程
  22. zookeeper 负载均衡和 nginx 负载均衡区别
  23. zookeeper watch 机制

2.2 手撕分布式通讯(Kafka+ActiveMQ+RabbitMQ)

(1)手撕分布式通讯之kafka

  1. Kafka 的设计时什么样的呢?
  2. 数据传输的事物定义有哪三种?
  3. Kafka 判断一个节点是否还活着有那两个条件?
  4. producer 是否直接将数据发送到 broker 的 leader(主节点)?
  5. Kafa consumer 是否可以消费指定分区消息?
  6. Kafka 消息是采用 Pull 模式,还是 Push 模式?
  7. Kafka 存储在硬盘上的消息格式是什么?
  8. Kafka 高效文件存储设计特点:
  9. Kafka 与传统消息系统之间有三个关键区别
  10. Kafka 创建 Topic 时如何将分区放置到不同的 Broker 中
  11. Kafka 新建的分区会在哪个目录下创建
  12. partition 的数据如何保存到硬盘
  13. kafka 的 ack 机制
  14. Kafka 的消费者如何消费数据
  15. 消费者负载均衡策略
  16. 数据有序
  17. kafaka 生产数据时数据的分组策略

(2)手撕分布式通讯之ActiveMQ

  1. 什么是 ActiveMQ?
  2. ActiveMQ 服务器宕机怎么办?
  3. 丢消息怎么办?
  4. 持久化消息非常慢
  5. 消息的不均匀消费。
  6. 死信队列。
  7. ActiveMQ 中的消息重发时间间隔和重发次数吗?

(3)手撕分布式通讯之RabbitMQ

  1. RabbitMQ 中的 broker 是指什么?cluster 又是指什么?
  2. 什么是元数据?元数据分为哪些类型?包括哪些内容?与 cluster 相关的元数据有哪些?元数据是如何保存的?元数据在 cluster 中是如何分布的?
  3. RAM node 和 disk node 的区别?
  4. RabbitMQ 上的一个 queue 中存放的 message 是否有数量限制?
  5. RabbitMQ 概念里的 channel、exchange 和 queue 这些东东是逻辑概念,还是对应着进程实体?这些东东分别起什么作用?
  6. vhost 是什么?起什么作用?
  7. 在单 node 系统和多 node 构成的 cluster 系统中声明 queue、exchange ,以及进行 binding 会有什么不同?
  8. 客户端连接到 cluster 中的任意 node 上是否都能正常工作?
  9. cluster 中 node 的失效会对 consumer 产生什么影响?若是在 cluster 中创建了mirrored queue ,这时 node 失效会对 consumer 产生什么影响?
  10. 能够在地理上分开的不同数据中心使用 RabbitMQ cluster 么?
  11. 为什么 heavy RPC 的使用场景下不建议采用 disk node ?
  12. 向不存在的 exchange 发 publish 消息会发生什么?向不存在的 queue 执行consume 动作会发生什么?
  13. routing_key 和 binding_key 的最大长度是多少?
  14. RabbitMQ 允许发送的 message 最大可达多大?
  15. 什么情况下 producer 不主动创建 queue 是安全的?
  16. “dead letter”queue 的用途?
  17. 为什么说保证 message 被可靠持久化的条件是 queue 和 exchange 具有durable 属性,同时 message 具有 persistent 属性才行?
  18. 什么情况下会出现 blackholed 问题?
  19. 如何防止出现 blackholed 问题?
  20. Consumer Cancellation Notification 机制用于什么场景?
  21. Basic.Reject 的用法是什么?
  22. 为什么不应该对所有的 message 都使用持久化机制?
  23. RabbitMQ 中的 cluster、mirrored queue,以及 warrens 机制分别用于解决什么问题?存在哪些问题?

2.3 手撕分布式之缓存(Redis+memcached+MongoDB)

(1)手撕分布式缓存之Redis

  1. redis 简介
  2. 为什么要用 redis /为什么要用缓存(高性能、高并发)
  3. 为什么要用 redis 而不用 map/guava 做缓存?
  4. redis 和 memcached 的区别
  5. redis 常见数据结构以及使用场景分析(String、Hash、List、Set、Sorted Set)
  6. redis 设置过期时间
  7. redis 内存淘汰机制(MySQL里有2000w数据,Redis中只存20w的数据,如何保证Redis中的数据都是热点数据?)
  8. redis 持久化机制(怎么保证 redis 挂掉之后再重启数据可以进行恢复)
  9. redis 事务
  10. Redis 常见异常及解决方案(缓存穿透、缓存雪崩、缓存预热、缓存降级)
  11. 分布式环境下常见的应用场景(分布式锁、分布式自增 ID)
  12. Redis 集群模式(主从模式、哨兵模式、Cluster 集群模式)
  13. 如何解决 Redis 的并发竞争 Key 问题
  14. 如何保证缓存与数据库双写时的数据一致性?

(2)分布式缓存之memcached

  1. memcached 是怎么工作的?
  2. memcached 最大的优势是什么?
  3. memcached 和服务器的 local cache (比如 PHP 的 的 APC 、mmap 文件等)相比,有什么优缺点?
  4. memcached 和 和 MySQL 的 的 query cache 相比,有什么优缺点?
  5. memcached 的 的 cache 机制是怎样的?
  6. memcached 如何实现冗余机制?
  7. 我需要把 memcached 中的 item 批量导出导入,怎么办?
  8. memcached 如何处理容错的?
  9. 如何将 memcached 中 中 item 批量导入导出?
  10. memcached 是如何做身份验证的?
  11. memcached 的多线程是什么?如何使用它们?
  12. memcached 能接受的 key 的最大长度是多少?
  13. memcached 对 对 item 的过期时间有什么限制?
  14. memcached 最大能存储多大的单个 item ?
  15. 为什么单个 item 的大小被限制在 1M byte 之内?

(3)手撕分布式缓存之MongoDB

  1. 你说的 NoSQL 数据库是什么意思?NoSQL 与 RDBMS 直接有什么区别?为什么要使用和不使用NoSQL 数据库?说一说 NoSQL 数据库的几个优点?
  2. NoSQL 数据库有哪些类型?
  3. MySQL 与 MongoDB 之间最基本的差别是什么?
  4. 你怎么比较 MongoDB、CouchDB 及 CouchBase?
  5. MongoDB 成为最好 NoSQL 数据库的原因是什么?
  6. 32 位系统上有什么细微差别?
  7. journal 回放在条目(entry)不完整时(比如恰巧有一个中途故障了)会遇到问题吗?
  8. 分析器在 MongoDB 中的作用是什么?
  9. 名字空间(namespace)是什么?
  10. 如果用户移除对象的属性,该属性是否从存储层中删除?
  11. 能否使用日志特征进行安全备份?
  12. 允许空值 null 吗?
  13. 更新操作立刻 fsync 到磁盘?
  14. 如何执行事务/加锁?
  15. 为什么我的数据文件如此庞大?
  16. 启用备份故障恢复需要多久?
  17. 什么是 master 或 primary?
  18. 什么是 secondary 或 slave?
  19. 我必须调用 getLastError 来确保写操作生效了么?
  20. 我应该启动一个集群分片(sharded)还是一个非集群分片的 MongoDB 环境?
  21. 分片(sharding)和复制(replication)是怎样工作的?
  22. 数据在什么时候才会扩展到多个分片(shard)里?
  23. 当我试图更新一个正在被迁移的块(chunk)上的文档时会发生什么?
  24. 如果在一个分片(shard)停止或者很慢的时候,我发起一个查询会怎样?
  25. 我可以把 moveChunk 目录里的旧文件删除吗?
  26. 我怎么查看 Mongo 正在使用的链接?
  27. 如果块移动操作(moveChunk)失败了,我需要手动清除部分转移的文档吗?
  28. 如果我在使用复制技术(replication),可以一部分使用日志(journaling)而其他部分则不使用吗?
  29. 当更新一个正在被迁移的块(Chunk)上的文档时会发生什么?
  30. MongoDB 在 A:{B,C}上建立索引,查询 A:{B,C}和 A:{C,B}都会使用索引吗?
  31. 如果一个分片(Shard)停止或很慢的时候,发起一个查询会怎样?
  32. MongoDB 支持存储过程吗?如果支持的话,怎么用?
  33. 如何理解 MongoDB 中的 GridFS 机制,MongoDB 为何使用 GridFS 来存储文件?

分布式(限流+缓存+通讯)答案解析整理:

 

03 微服务(Dubbo+Spring Boot+Spring Cloud)

微服务答案解析如下:

 

3.1 手撕微服务之Dubbo

  1. Dubbo 支持哪些协议,每种协议的应用场景,优缺点?
  2. Dubbo 超时时间怎样设置?
  3. Dubbo 有些哪些注册中心?
  4. Dubbo 集群的负载均衡有哪些策略
  5. Dubbo 的核心功能?
  6. Dubbo 服务注册与发现的流程?
  7. Dubbo 的架构设计?
  8. Dubbo 框架设计一共划分了 10 个层:
  9. Dubbo 支持哪些协议,每种协议的应用场景,优缺点?
  10. dubbo 推荐用什么协议?
  11. Dubbo 默认采用注册中心?
  12. Dubbo 与 Spring 的关系?
  13. Dubbo 的集群容错方案有哪些?
  14. Dubbo 的默认集群容错方案?
  15. Dubbo 在安全机制方面是如何解决?
  16. Dubbo 和 Spring Cloud 的关系?
  17. Dubbo 超时时间怎样设置?
  18. Dubbo 和 Spring Cloud 的区别?

3.2 手撕微服务之Spring Boot

  1. 什么是 Spring Boot?
  2. Spring Boot 有哪些优点?
  3. 什么是 JavaConfig?
  4. 如何重新加载 Spring Boot 上的更改,而无需重新启动服务器?
  5. Spring Boot 中的监视器是什么?
  6. 如何在 Spring Boot 中禁用 Actuator 端点安全性?
  7. 如何在自定义端口上运行 Spring Boot 应用程序?
  8. 什么是 YAML?
  9. 什么是 Spring Profiles?
  10. 什么是 Spring Batch?
  11. 如何集成 Spring Boot 和 ActiveMQ?
  12. 如何使用 Spring Boot 实现分页和排序?
  13. 什么是 Swagger?你用 Spring Boot 实现了它吗?
  14. 什么是 FreeMarker 模板?
  15. 如何使用 Spring Boot 实现异常处理?
  16. 您使用了哪些 starter maven 依赖项?
  17. 什么是 CSRF 攻击?
  18. 什么是 WebSockets?
  19. 什么是 AOP?
  20. 什么是 Apache Kafka?
  21. 我们如何监视所有 Spring Boot 微服务?

3.3 手撕微服务之Spring Cloud

  1. 什么是 Spring Cloud?
  2. 使用 Spring Cloud 有什么优势?
  3. 服务注册和发现是什么意思?Spring Cloud 如何实现?
  4. 负载平衡的意义什么?
  5. 什么是 Hystrix?它如何实现容错?
  6. 什么是 Hystrix 断路器?我们需要它吗?
  7. 什么是 Spring Cloud Bus?我们需要它吗?
  8. 什么是 Netflix Feign?它的优点是什么?

微服务(Dubbo+Spring Boot+Spring Cloud)答案解析整理:

 

04 性能优化(JVM+Tomcat+MySQL)

性能优化答案解析如下:

 

4.1 手撕性能优化之JVM

  1. Java 类加载过程?
  2. 描述一下 JVM 加载 Class 文件的原理机制?
  3. Java 内存分配。
  4. GC 是什么? 为什么要有 GC?
  5. 简述 Java 垃圾回收机制。
  6. 如何判断一个对象是否存活?(或者 GC 对象的判定方法)
  7. 垃圾回收的优点和原理。并考虑 2 种回收机制
  8. 垃圾回收器的基本原理是什么?垃圾回收器可以马上回收内存吗?有什么办法主动通知虚拟机进行垃圾回收?
  9. Java 中会存在内存泄漏吗,请简单描述。
  10. 深拷贝和浅拷贝。
  11. System.gc 和 Runtime.gc 会做什么事情?
  12. finalize 方法什么时候被调用?析构函数 (finalization) 的目的是什么?
  13. 如果对象的引用被置为 null,垃圾收集器是否会立即释放对象占用的内存?
  14. 什么是分布式垃圾回收(DGC)?它是如何工作的?
  15. 串行(serial)收集器和吞吐量(throughput)收集器的区别是什么?
  16. 在 Java 中,对象什么时候可以被垃圾回收?
  17. 简述 Java 内存分配与回收策率以及 Minor GC 和 MajorGC
  18. JVM 的永久代中会发生垃圾回收么?
  19. Java 中垃圾收集的方法有哪些?
  20. 什么是类加载器,类加载器有哪些?
  21. 类加载器双亲委派模型机制?

4.2 手撕性能优化之Tomcat

  1. 你怎样给 tomcat 去调优?
  2. 如何加大 tomcat 连接数
  3. tomcat 中如何禁止列目录下的文件
  4. 怎样加大 tomcat 的内存
  5. Tomcat 有几种部署方式
  6. Tomcat 的优化经验

4.3 手撕性能优化之MySQL

  1. 为查询缓存优化你的查询
  2. EXPLAIN你的SELECT查询
  3. 当只要一行数据时使用LIMIT 1
  4. 为搜索字段建索引
  5. 在Join表的时候使用相当类型的例,并将其索引
  6. 千万不要 ORDER BY RAND
  7. 避免 SELECT *
  8. 永远为每张表设置一个 ID
  9. 使用 ENUM 而不是 VARCHAR
  10. 从 PROCEDURE ANALYSE 取得建议
  11. 尽可能的使用 NOT NULL
  12. Prepared Statements
  13. 无缓冲的查询
  14. 把 IP 地址存成 UNSIGNED INT
  15. 固定长度的表会更快
  16. 垂直分割
  17. 拆分大的 DELETE 或 INSERT 语句
  18. 越小的列会越快
  19. 选择正确的存储引擎
  20. 使用一个对象关系映射器(Object Relational Mapper)
  21. 小心“永久链接”

性能优化(JVM+Tomcat+MySQL)答案解析整理:

 

最后再说一遍:点击下面的链接,进去即可领取全部的答案!!!!

《终极手撕之架构大全:分布式+开源框架+微服务+性能优化,够不够?》

Guess you like

Origin www.cnblogs.com/think90/p/11977152.html