Alibaba, Baidu, the US group, large collection of face questions, you are more willing to easily win the manufacturers offer.

    点关注,不迷路;持续更新Java相关技术及资讯!!!
以下内容呕心沥血收集了很久,内容有点长 。希望点个喜欢,给个评论!分享给更多的朋友!

Inconsistency (data conflicts) when we operate the database, may be due to concurrency issues caused by data. How to ensure concurrent access to data consistency, efficiency, is a problem that must be addressed for all database lock conflicts also affect the performance of concurrent access to the database is an important factor, from this point of view, for a database lock is particularly important.
MySQL Overview lock
relative to other databases, MySQL locking mechanism is relatively simple, its most notable feature is the different storage engines support different lock mechanisms.
such as:
Here Insert Picture Description

Welcome into the group exchange

MyISAM and MEMORY storage engine uses a table-level lock (Table-Level locking);
the InnoDB storage engine supports both row-level locks (row-level locking), also support table lock, but the default is to use row level locking.
MySQL locks the two main characteristics can be broadly summarized as follows:
Ali P8 architects talk: MySQL row locks, table locks, pessimistic locking, optimistic locking features and application of
table-level lock: Small overhead, lock fast; will not die lock (because MyISAM will lock time access to all the required SQL);
locking the large size, the highest probability of lock conflicts, the lowest degree of concurrency.
Row-level locking: large overhead, locking slow; there will be a deadlock; locking the smallest size, lowest probability of lock conflicts, have the highest degree of concurrency.
Page locks: lock overhead and speed between the table and row locks; deadlock occurs; particle size between locking table and row locks,
concurrency general
rows and table locks
1. mainly for locking granularity division, generally divided into: row locks, table locks, library lock
(1) row locks: access to the database, lock the entire line of data to prevent concurrency errors.
(2) table lock: access to the database, lock the entire table data to prevent concurrency errors.
2. The difference between the row and table locks: the
table lock: Small overhead, locking fast, does not deadlock; large locking strength, high probability of lock conflicts, the lowest degree of concurrency
row lock: spending big, slow lock will deadlock; lock small size, low probability of lock conflicts, high concurrency
pessimistic locking and optimistic locking
(1) pessimistic lock: As the name suggests, is very pessimistic, pick up data every time the thought that others will modify, so every secondary
It will be locked at the time to get the data, so that others want to take this data will block until it got the lock.
Traditional relational database inside to use a lot of this locking mechanism, such as row locks, table locks, etc., read locks, write locks, etc.,
are doing first before locking operation.
(2) optimistic lock: As the name suggests, is very optimistic, pick up data every time when they are that others will not be modified, it is not
at lock, but when the update will determine what others during this time did not go to update the data you can use the version
mechanism number.
Optimistic locking is suitable for the types of applications to read, which can improve throughput, the database provides similar as if
optimistic locking write_condition mechanisms are actually provided.
(3) the difference between optimistic and pessimistic locking lock:
other kinds of locks have advantages and disadvantages, can not be considered to be a good alternative, as optimistic locking apply to lower write relatively few cases that conflict
when very rarely happens , so we can save a lock of overhead, increase the overall throughput of the system. But if often produce
raw conflict, the upper application will continue to be retry, such but rather reduces the performance, so use pessimistic locking is more appropriate in this case.
Shared lock

Shared lock refers to a number of different transactions, sharing the same lock on the same resource. Equivalent for the same door, the same as it has more keys. Like this, there is a door to your house, there are several keys to the door, you have one, you have a girlfriend, you are likely to enter your home through the key, this is the so-called shared lock.

Just say, pessimistic locking, the general database has been achieved, a shared lock also belong to a pessimistic lock, then shared lock in mysql through what command to call it. By querying the information learned through the back plus lockin share mode executing a statement on behalf of certain resources coupled with a shared lock.

When to use table locks

For InnoDB tables, in most cases you should use row-level locking, since the transaction and row lock often we chose InnoDB tables grounds. But in individual special affairs, may also consider the use of table-level locking.

The first is: Transaction most or all of the data needs to be updated, and relatively large table, if you use the default row locks, this transaction is not only low efficiency, and may cause other transactions to wait long locks and lock the conflict, the situation can be considered under use table locks to increase the speed of execution of the transaction.

The second scenario is: a transaction involving multiple tables, more complex, is likely to lead to deadlock, resulting in a large number of transaction rollback. This situation can also be considered a one-time transaction involves locking the table in order to avoid deadlock and reduce the overhead of database due to transaction rollback brings.

Of course, the application of these two transactions can not be too much, otherwise, you should consider using a MyISAM table.

Table and row locks scenarios:
table-level locking and concurrent use is not high, mainly to check, apply a small amount of updates, such as small web application;
and row-level locking is suitable for highly concurrent environment, transaction integrity requirements higher systems, such as online transaction processing systems.

BAT range of technical interview

Data Structures and Algorithms: The most common variety of sorting, the best handwriting
.
.
The Java Advanced: JVM memory structures, garbage collector, collection algorithm, GC, concurrent programming related (multi-
threading, thread pool, etc.), NIO / BIO, compare the advantages and disadvantages of various sets of class (underlying data structures must
grasp, especially expansion, etc.) and the like.
.
.
Performance optimization, design patterns, UML grasp
.
.
The Spring Framework: master key (BAT each will ask)
.
.
Distributed related: Redis cache, consistent Hash algorithm, distributed storage, load balancing and so on.
.
.
Micro service and Docker containers.
.
The most full-Ali interview questions
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Ali interview summary

阿里的面试特别喜欢面试 技术原理,特别是
.
多线程
.
.
NIO
.
.
异步消息框架
.
.
分布式相关的缓存算法等
.
.
JVM 的加载过程和原理
回收算法
以及具体使用过的框架,会问部分参数检验你是否熟用
第一面能通过,后续被录用的可能性就比较高了,第一轮非常重要,建议系
统性的学习面试题目!
以上就是完整的阿里技术面试题目、以及阿里面试经验总结,希望对你有所帮助!

一面:
HashMap 实现原理,ConcurrentHashMap 实现原理
红黑树,为什么允许局部不平衡
TCP,UDP 区别,为什么可靠和不可靠
一次 HTTP 请求的全过程,包括域名解析、定位主机等
TCP 三次握手
MySQL 事务是什么?四大特性,四大隔离级别
ConcurrentHashMap 和 Hashtable 区别
spring IOC 和 AOP,以及各有什么优点
有哪几种常用的线程池
什么情况下使用 Runnable 和 Thread 创建线程,Runnable 和 Callable 的区别
线程方法中的异常如何处理,副线程可以捕获到吗
synchronized 和锁的区别,什么情况下使用 synchronized 和 ReentrantLock
JVM 的对象分配在哪个区,Class 对象分配在哪个区
二面:
常用的设计模式介绍:单例模式、装饰者模式等
Java 会出现内存溢出吗?什么情况下会出现?
双亲委派模型,为什么这样做?
对象什么情况下进入老年代?
快速排序说一下过程
AOP 实现原理:动态代理
BIO、NIO(如何实现的)、AIO
消息中间件有哪些?他们之间的优劣势?
Redis,持久化框架
栈和队列
垃圾回收算法
MySQL 的索引
Tomcat 类加载器
OOM 内存泄漏,什么情况下会出现,如何排查
三面:
介绍你实践的性能优化案例,以及你的优化思路
微服务和 SOA 的区别,优劣势
SQL 慢查询的优化方案,索引和表的优化方案。
MySQL 与 MongoDB 的区别,海量数据的存储
缓存框架,例如 Redis、Memcached 之间的区别,优劣势比较
请描述一致 hash 算法
分布式 session 的共享方案有哪些,有什么优劣势
高并发情况,系统的优化方案有哪些,以及优先级排序。
面试总结
一面:
ArrayList 和 linkedlist 区别。ArrayList 是否会越界。
ArrayList 和 hashset 有何区别。hashset 存的数是有序的么。
volatile 和 synchronized 区别
多态的原理
数据库引擎 Innodb 和 myisam 区别
Redis 的数据结构
Redis 是基于内存的么
Redis 的 list zset 的底层实现
http 和 https 的区别,tcp 握手过程
jvm 垃圾回收算法手写冒泡
手写单例包括多线程下
Java 线程间怎么实现同步,notify()与 notifyAll()的区别
数据库的悲观锁和乐观锁应用场景。
排序算法的复杂度,快速排序非递归实现。
海量数据过滤,黑名单过滤一个 url。
二面:
list set map 底层使用什么实现的有哪些典型实现
hashmap 扩容是怎么扩容的,为什么是 2 的幂
concurrenthashmap 为什么线程安全,采用了什么措施应对高并发
线程池的参数有什么意义
Springmvc 请求流程
Spring IOC,autowired 如何实现
Spring boot
SpringClound 的基本架构设计
Dubbo 和 SpringClound 的区别在哪里,优劣势
说说一致性 Hash 算法
三面:
分布式架构设计哪方面比较熟悉
讲讲你对 CDN 的了解,与分布式缓存和本地缓存的区别
多线程和高并发有什么区别
高并发下有哪些常用的技术解决方案,举三个高并发场景设计例子
说一个你对 JVM 优化的实际案例,包括实际步骤和方法
Docker 有使用过和了解吗?Docker 和 JVM 的区别是什么?
Docker 的基本架构和使用场景?
负载均衡有接触过哪些开源框架,优劣势是什么?
数据库分库分表需要怎样来实现?
数据库端的常用优化策略?
如果让你来设计秒杀系统,你的设计思路是什么,为什么要这样设计?

面试总结

java 的基础知识点,主要围绕在集合类和多线程等:ArrayList、LinkedList、HashSet、HashpMap
的数据结果,以及如何扩容、以及 ConcurrentHashMap 相关的多线程安全等。
JVM 的内存分配、几个常见的垃圾回收算法以及原理、还有对应的 JVM 优化参数需要牢记。
网络:TCP 的三次握手等网络都必问,重点掌握网络协议。
Redis:作为分布式缓存的主力,基本也是 BAT 每次必考,重点是 Redis 的数据结构、内存、
算法、持久化,以及与别的缓存 memcached 的优劣势。
多线程:状态流转、多线程的实现,以及与高并发的区别等。
Spring 框架问得是最多的,BAT 非常喜欢问,重点掌握。
最后就是分布式架构设计
常用的分布式架构设计方案:单点登录、分布式缓存、存储、消息的选型,还有就是数据
库端的优化方案(需要提前了解)。
最好能提前了解深入一个类似秒杀这样的项目,如果面试官问到类似的项目,你能把设计
思路讲出来,这对你的面试结果是很大的加分项。

一面
1.自我介绍
2.谈一个你觉得你学到最多的项目,使用了什么技术,挑战在哪里
3.Spring 的 bean 的作用域?(比如:singleton,prototype 等)
4.Spring 的 IOC 实现原理?没有无参构造函数能实例化吗?有参构造函数注入?(xml 配置)
5.通过反射,谈到了方法区,然后,类加载机制?
6.synchronized 的实现原理?Volatile 能保证原子性吗?为什么?
7.hashmap 和 concurrenthashmap 的 size 方法怎么实现的
8.JVM 的调优参数?(-Xmn,-Xms 等具体参数设置)
9.线程池优点,参数,如果我想实现 newSingleThreadPoll,应该怎么配置,构造方法传什么
参数
10.mysql 死锁,怎么解决,如果不要求执行顺序,死锁怎么解决
11.ioc 和 aop 原理
12.线程的五态?转化过程?
13.TCP 三次握手,为什么三次握手?
14.JVM 内存分区?(主存,工作内存,堆,栈。。。。)
15.讲一下 GC?
16.为什么要用老年代和新生代?
17.新生代进入老生代的情况?
18.新生代的分区?
二面
变着法的问了一大堆线程池的知识 (主要考对应的参数)
java 内存模型
lock 和 synchronized 的区别
reentrantlock 的实现
hashmap 和 concurrenthashmap
B+树和 B-树的区别
复合索引
聚集索引和非聚集索引的区别?
数据库索引 主键和唯一索引有什么区别
索引失效条件,什么时候该建立索引
innDB 和 MyISAM 的区别?
线程安全(阻塞同步,非阻塞同步,无同步)
三面
主要高并发和分布式架构设计
服务器模型以及之间的区别
线程池的设计
线程池如何做负载均衡
如何实现线程调度算法
复合索引是如何实现的?
如何设计单点登录,单点登录的原理
redis 缓存和 memcached 缓存的区别,以及各自的优劣势
大型高并发网站如何做性能优化:Web 性能、数据库性能、应用服务器性能等。
实践中如何优化 MySQL:SQL 语句及索引的优化、数据库表结构的优化、系统配置的优化、
硬件的优化
分库分表和读写分离如何设计
微服务架构:dubbo 和 springcloud 的区别,以及各自对应的使用场景。

淘宝一面:

面试介绍
1)自我介绍?
2)项目介绍?
3)遇到的最大困难是什么?怎么解决的?
4)你觉得你能怎么优化这个项目?

面试题目

1)讲一下 JVM
2)讲一下 JVM 的分代回收以及具体算法
3)将一下 JVM 的垃圾收集器,G1 和 CMS 有啥区别?
4)讲一下一个变量从产生到结束所经历的过程,讲一下字符串常量的过程?
5)将一下线程安全问题产生的原因?
6)讲一下乐观锁和悲观锁
7)乐观锁是怎么保证一致性的
8)Integer 和 int 有啥区别,integer 中有哪些特殊的函数?
9)讲一下数据库的隔离等级
10)说一下 MVCC
11)说一聚簇索引和非聚簇索引的有什么不同

淘宝二面:

1、问了冒泡排序,快排,和归并排序及优缺点和优化
2,网络方面有 osi 七层,tcp/ip 五层,分别有哪些协议及作用
3,爬虫用的什么数据结构
4、tcp 的流量控制和拥塞控制
5,mysql 用的什么存储引擎,这个存储引擎用的什么数据结构 ,有哪些优缺点,怎么使用
6,jvm 的垃圾回收机制和垃圾收集器
7、spring 当中事物的隔离级别
8、jdk1.8 concurrenthashmap 的新的特性,有没有看过源码
9、 threadlocal 了解吗
10,问了 redis 的一些问题,项目中有(扩容,失效 key 清理策略等)
11,剩下的都是项目的东西(kafka filebeat elk 原理,主从选举,复制等)
12,后面扩展的问了一些大数据相关的,问我一些大数据处理框架是否有了解
整个过程四十分钟左右

淘宝三面

主要项目,你做过哪些项目,用过哪些技术?了解哪些框架?你觉得对你技术提升最高的是
哪一件事情,提升了你哪一方面的技术?
1)讲一下 Spring AOP 和 IOC 的底层实现
2)说一下 hashcode 的作用?HashMap 的底层实现?HashMap 和 HashTable 的区别
3)说一下 concurrentHashMap 和 hashTable 在性能上的区别?以及这种差异形成的原因
4)讲一下堆以及堆排序
5)说一下 B+tree 和二叉搜索树的区别?说一下二叉搜索树和 AVL 树、红黑树之间的差别
6)给你两个文件(字符串形式的)如何找出他们之间的不同地方?
7)你刚刚说的能怎么优化?

淘宝四面 交叉面

本来以为三面结束就是 hr 面了,又收到一面交叉面

  1. 给你 50 亿行字符串,机器 4G 内存(只能一台机器),找出重复次数最多的那行字符串?(以行为单位,每行不超过 10 个字符)
    2.设计一个算法,实现两个 10g 大文件在 10m 的内存中将两个大文件中重复的放进第三个文件
  2. 快速排序的平均复杂多少?最坏情况是什么?(这个题估计就是缓和一下尴尬的气氛)
    支付宝一面
  3. 介绍一下自己。
  4. 项目参与的核心设计有哪些
  5. ArrayList 和 LinkedList 底层
  6. HashMap 及线程安全的 ConcurrentHashMap,以及各自优劣势
  7. Java 如何实现线程安全
  8. Synchronized 和 Lock 哪个更好?
  9. HashMap 中的 get()方法是如何实现的?
  10. HashMap 可以用在哪些场景?
  11. JVM,垃圾回收机制,内存划分等
  12. SQL 优化,常用的索引?
  13. 还有什么问题需要问的。
  14. 支付宝二面
  15. 没有自我介绍,直接问做过哪些 Java 开发相关的项目。
  16. 对哪些技术比较熟悉?
  17. 多线程状态图,状态如何流转?
  18. 死锁,死锁原因
  19. 页锁、乐观锁、悲观锁?
  20. 乐观锁如何保证线程安全?
  21. 用过线程池吗,对应的好处,如何用?
  22. 两个 10G 的文件,里面是一些 url,内存只有 1G,如何将这两个文件合并,找到相同的 url?
  23. 1000 个多并发线程,10 台机器,每台机器 4 核的,设计线程池大小。
  24. 代码题:两个有序数组,数组中存在重复数字,合并成一个有序数组,去除重复数字。
  25. 说一下自己的优点。
  26. 支付宝三面
  27. jvm 性能调优都做了什么
  28. 数据库性能调优如何做
  29. 分布式系统原理:CAP,最终一致性,幂等操作等
  30. 高并发情况下,我们系统是如何支撑大量的请求的
  31. 集群如何同步会话状态
  32. 常用 NOSQL,有做过比较?
  33. 什么情况会出现雪崩,以及如何应对?
  34. 负载均衡的原理
  35. 数据库事务属性

支付宝一面

. 介绍一下自己。
. 项目参与的核心设计有哪些
. ArrayList 和 LinkedList 底层
. HashMap 及线程安全的 ConcurrentHashMap,以及各自优劣势
. Java 如何实现线程安全
. Synchronized 和 Lock 哪个更好?
. HashMap 中的 get()方法是如何实现的?
. HashMap 可以用在哪些场景?
. JVM,垃圾回收机制,内存划分等
. SQL 优化,常用的索引?
. 还有什么问题需要问的。

支付宝二面

没有自我介绍,直接问做过哪些 Java 开发相关的项目。
. 对哪些技术比较熟悉?
. 多线程状态图,状态如何流转?
. 死锁,死锁原因
. 页锁、乐观锁、悲观锁?
. 乐观锁如何保证线程安全?
. 用过线程池吗,对应的好处,如何用?
. 两个 10G 的文件,里面是一些 url,内存只有 1G,如何将这两个文件
合并,找到相同的 url?
. 1000 个多并发线程,10 台机器,每台机器 4 核的,设计线程池大小。
. 代码题:两个有序数组,数组中存在重复数字,合并成一个有序数组,
去除重复数字。
. 说一下自己的优点。

支付宝三面

. jvm 性能调优都做了什么
. 数据库性能调优如何做
. 分布式系统原理:CAP,最终一致性,幂等操作等
. 高并发情况下,我们系统是如何支撑大量的请求的
. 集群如何同步会话状态
. 常用 NOSQL,有做过比较?
. 什么情况会出现雪崩,以及如何应对?
. 负载均衡的原理
. 数据库事务属性

美团内推(一面+二面+三面)面试题

美团一面(电话)
自我介绍
项目介绍
Redis 介绍
了解 redis 源码么
了解 redis 集群么
Hashmap 的原理,增删的情况后端数据结构如何位移
hashmap 容量为什么是 2 的幂次
hashset 的源码
object 类你知道的方法
hashcode 和 equals
你重写过 hashcode 和 equals 么,要注意什么
假设现在一个学生类,有学号和姓名,我现在 hashcode 方法重写的时候,只将学号参与计
算,会出现什么情况?
往 set 里面 put 一个学生对象,然后将这个学生对象的学号改了,再 put 进去,可以放进
set 么?并讲出为什么
Redis 的持久化?有哪些方式,原理是什么?
讲一下稳定的排序算法和不稳定的排序算法
讲一下快速排序的思想
美团二面(现场)
自我介绍
讲一下数据的 acid
什么是一致性
什么是隔离性
Mysql 的隔离级别
每个隔离级别是如何解决
Mysql 要加上 nextkey 锁,语句该怎么写
Java 的内存模型,垃圾回收
线程池的参数
每个参数解释一遍
然后面试官设置了每个参数,给了是个线程,让描述出完整的线程池执行的流程
Nio 和 IO 有什么区别
Nio 和 aio 的区别
Spring 的 aop 怎么实现
Spring 的 aop 有哪些实现方式
动态代理的实现方式和区别
Linux 了解么
怎么查看系统负载
Cpu load 的参数如果为 4,描述一下现在系统处于什么情况
Linux,查找磁盘上最大的文件的命令
Linux,如何查看系统日志文件
手撕算法:leeetcode 原题 22,Generate Parentheses,给定 n 对括号,请写一个函数以将
其生成新的括号组合,并返回所有组合结果。
美团三面(现场)
三面没怎么问技术,问了很多技术管理方面的问题
自我介绍
项目介绍
怎么管理项目成员
当意见不一致时,如何沟通并说服开发成员,并举个例子
怎么保证项目的进度
数据库的索引原理
非聚簇索引和聚簇索引
索引的使用注意事项
联合索引
从底层解释最左匹配原则
Mysql 对联合索引有优化么?会自动调整顺序么?哪个版本开始优化?
Redis 的应用
Redis 的持久化的方式和原理
技术选型,一个新技术和一个稳定的旧技术,你会怎么选择,选择的考虑有哪些
说你印象最深的美团点评技术团队的三篇博客
最近在学什么新技术

美团内推(一面 美团内推(一面+ 二面+三面)面试题目 三面)面试题目

美团一面(电话)
. 自我介绍
. 项目介绍
. Redis 介绍
. 了解 redis 源码么
. 了解 redis 集群么
. Hashmap 的原理,增删的情况后端数据结构如何位移
. hashmap 容量为什么是 2 的幂次
. hashset 的源码
. object 类你知道的方法
. hashcode 和 equals
. 你重写过 hashcode 和 equals 么,要注意什么
. 假设现在一个学生类,有学号和姓名,我现在 hashcode 方法重写的时
候,只将学号参与计算,会出现什么情况?
. 往 set 里面 put 一个学生对象,然后将这个学生对象的学号改了,再 put
进去,可以放进 set 么?并讲出为什么
. Redis 的持久化?有哪些方式,原理是什么?
. 讲一下稳定的排序算法和不稳定的排序算法
. 讲一下快速排序的思想
美团二面(现场)
. 自我介绍
. 讲一下数据的 acid
. 什么是一致性
. 什么是隔离性
. Mysql 的隔离级别
. 每个隔离级别是如何解决
. Mysql 要加上 nextkey 锁,语句该怎么写
. Java 的内存模型,垃圾回收
. 线程池的参数
. 每个参数解释一遍
. 然后面试官设置了每个参数,给了是个线程,让描述出完整的线程池执
行的流程
. Nio 和 IO 有什么区别
. Nio 和 aio 的区别
. Spring 的 aop 怎么实现
. Spring 的 aop 有哪些实现方式
. 动态代理的实现方式和区别
. Linux 了解么
. 怎么查看系统负载
. Cpu load 的参数如果为 4,描述一下现在系统处于什么情况
. Linux,查找磁盘上最大的文件的命令
. Linux,如何查看系统日志文件
. 手撕算法:leeetcode 原题 22,Generate Parentheses,给定 n 对
括号,请写一个函数以将其生成新的括号组合,并返回所有组合结果。
美团三面(现场)
. 三面没怎么问技术,问了很多技术管理方面的问题
. 自我介绍
. 项目介绍
. 怎么管理项目成员
. 当意见不一致时,如何沟通并说服开发成员,并举个例子
. 怎么保证项目的进度
. 数据库的索引原理
. 非聚簇索引和聚簇索引
. 索引的使用注意事项
联合索引
. 从底层解释最左匹配原则
. Mysql 对联合索引有优化么?会自动调整顺序么?哪个版本开始优化?
. Redis 的应用
. Redis 的持久化的方式和原理
. 技术选型,一个新技术和一个稳定的旧技术,你会怎么选择,选择的考
虑有哪些
. 说你印象最深的美团点评技术团队的三篇博客
. 最近在学什么新技术

百度一面(现场)

. 自我介绍
. Java 中的多态
. 为什么要同时重写 hashcode 和 equals
. Hashmap 的原理
. Hashmap 如何变线程安全,每种方式的优缺点
. 垃圾回收机制
. Jvm 的参数你知道的说一下
. 设计模式了解的说一下啊
. 手撕一个单例模式
算法题目
. 手撕算法:反转单链表
. 手撕算法:实现类似微博子结构的数据结构,输入一系列父子关系,输
出一个类似微博评论的父子结构图
. 手写 java 多线程
. 手写 java 的 soeket 编程,服务端和客户端
. 手撕算法: 爬楼梯,写出状态转移方程
. 智力题:时针分针什么时候重合

百度二面(现场)

. 自我介绍
. 项目介绍
. 服务器如何负载均衡,有哪些算法,哪个比较好,一致性哈希原理,怎
么避免 DDOS 攻击请求打到少数机器。
. TCP 连接中的三次握手和四次挥手,四次挥手的最后一个 ack 的作用是
什么,为什么要 time wait,为什么是 2msl。
. 数据库的备份和恢复怎么实现的,主从复制怎么做的,什么时候会出现
数据不一致,如何解决。
. Linux 查看 cpu 占用率高的进程
. 手撕算法:给定一个数字三角形,找到从顶部到底部的最小路径和。每
一步可以移动到下面一行的相邻数字上。
. 然后继续在这个问题上扩展
. 求出最短那条的路径
. 递归求出所有的路径
. 设计模式讲一下熟悉的
. 会不会滥用设计模式
. 多线程条件变量为什么要在 while 体里
. 你遇到什么挫折,怎么应对和处理

百度三面(现场)

. 自我介绍
. 项目介绍
. Redis 的特点
. Redis 的持久化怎么做,aof 和 rdb,有什么区别,有什么优缺点。
. Redis 使用哨兵部署会有什么问题,我说需要扩容的话还是得集群部署。
. 说一下 JVM 内存模型把,有哪些区,分别干什么的
. 说一下 gc 算法,分代回收说下
. MySQL 的引擎讲一下,有什么区别,使用场景呢
. 分布式事务了解么
. 反爬虫的机制,有哪些方式

蚂蚁金服一面:分布式架构 50 分钟

1、个人介绍加项目介绍 20 分钟
2、微服务架构是什么,它的优缺点?
3、ACID CAP BASE 理论
4、分布式一致性协议,二段、三段、TCC,优缺点
5、RPC 过程
6、服务注册中心宕机了怎么办?
7、微服务还有其他什么组件
8、分布式架构与微服务的关系
9、你有什么问题要问我的。

蚂蚁金服二面:1 个小时

上来不用自我介绍,项目介绍,直接开始
算法来两道
1、各种排序算法、未排序常规数据查找第 K 大的数,时间复杂度。
2、二叉树的深度
操作系统来两道
3、虚拟内存分页了解不?
4、进程和线程区别?
数据库来三道
5、第一二三范式是什么?
6、一个表一千个列值为 true 和 false,写 sql 查询 有 300 个列值为 true 的行。
7、脏读和幻读是什么?
JVM
8、什么对象会从新生代晋升到老年代
多线程
9、一个任务分成十个任务,最后汇总计算,不能用 fork/join
10、开源框架源码了解不?
11、数据建模两道、个人题开放性题
安全方面的问题
12、对安全方面了解多少?
13、 安全协议有哪些 、https 是啥?
介绍你做的项目和其中的难点。

三面

个人感觉着重技术深度。
1、从 ConcurrentHashMap 一路问到锁&锁优化->LongAdder->伪共享->缓存行填充->cas 等诸
多技术细节;
2、从 hystrix 一路问到原理->自己如何实现->如何优化->响应流编程(reactive streams);
3、从简单的生产者消费者模式设计到如何高效健壮实现等等。

四面

1, how to reverse the output singly linked list?
2, direct personal idea is to use the advanced features of the stack, the stack in the linked list data read and output.
3, there is a better way to achieve it?
4, mainly to ask the project, according to a project and then asked if the order by 1000, how would you do? What have excellent
measures? High performance & highly available measures?

Five-sided: HR surface

For everyone to throw a few big pit problems:
1, individual career planning is what
2, the biggest problem you encountered or what is difficult is
3, do you think Ali
4, you can bring what is Ali
5, your What advantages and disadvantages of
these questions, pondering ah, not much to say.
Here Insert Picture Description

Interview Summary:

1. The technical foundation must be solid: algorithms, data structures, operating systems, ants gold dress interview on the basis of technology attaches great importance to the students a solid foundation in favor of Win the first two rounds.

2. Technical Width: mainly concentrated in high concurrency, multi-threaded, distributed architecture, large and popular middleware (caching) selection and comparison.

3. depth technical principles: the focus is ready ahead of JVM, multi-threaded high-concurrency piece.

4. Participation Project summary: the key details you need to know you are doing the project, optimization, characteristics, principle.

5. Many third-party libraries & middleware used in principle, even if you do not know, but also have their own ideas instead of be able to tell how to achieve, such as single-point alternative login.

6. best, prepare in advance a large data access, such as pv 1000 whereas your architecture or technical programmatic responses.

7. Finally, do not fall in HR interview process, avoiding the focus, in particular, the advantages and disadvantages, if you ask what your plans are, please remember to tell HR sure you want to be a good technologist

Concerns, comments java share knowledge every day, giving Spring source code analysis, Dubbo, Redis, Netty, ZooKeeper, Spring
Cloud, distributed data

Guess you like

Origin blog.csdn.net/XingXing_Java/article/details/90602825