Unexpectedly, I had a telephone interview with Ali a year ago, saying that I didn’t want to change my job, but the amateur HR (should be the technical director) didn’t introduce the job position and requirements, but directly appointed a certain evening phone interview time, and was “abused” with a curious attitude.
The general feeling is that the questions asked by the interviewer are very deep, basically at the system or principle level. I wonder if it represents the basic idea of Ali’s interview.
The memory model of the JVM
The Runtime Data Area can be divided into two parts according to whether or not threads share the memory. Threads share the Method Area and Heap, and threads share the Java Stack. Native Method Stack and Program Counter Register.
Of course, there have been some changes since 1.8. As I understand it, the constant pool and other information stored in the method area have now been moved to the heap.
In 1.8 -xx :PermSize and -xx :MaxPermSize have been deactivated and replaced with a new Metaspace area.
In JDK 1.7 and previous JDK versions, Java class information, constant pools, and static variables are stored in Perm (persistent generation). Class metadata and static variables are allocated to Perm when the class is loaded, and the garbage collector removes the metadata and static variables from Perm when the class is unloaded. Of course constant pool stuff will also be handled during Perm garbage collection.
The changes to the JVM architecture in JDK 1.8 put class metadata in local memory, plus constant pools and static variables in the Java heap. The HotSopt VM will explicitly allocate and free local memory for the metadata of the class. In this architecture, class meta information breaks through the old limitation of -xx :MaxPermSize and can now use more local memory. This solves some of the common Full GC problems of generating a large number of classes at runtime, such as runtime reflection, proxies, etc.
So the Java heap space may increase after the upgrade.
Http1.0, HTTP1.1, and HTTP2.0
Compared to 1.0, 1.1 can transfer multiple files at the same time. Browsers of all types probably support 3~5 requests at the same time.
Http2.0 is also a relatively recent addition to Nginx, with the binary format replacing text. Add multiplexing and header compression to solve head of line blocking, and server pushing and other new features. The agreement is still to read the official website, but this thing after a period of easy to forget.
Impact of Get/Post on cache
The browser cache does not support Post and Get requests for HTTP methods. Get can be cached by the browser.
Browser rendering mechanism
I can’t answer this question. It’s too big. I’ve probably seen some of V8’s mechanics. Such as building Dom, generating CSS rules, and so on. But the truth has not been systematically understood.
Mysql Join principle and index data structure and implementation principle
Mysql innoDB join supports Nested Loop only, but does not support Hash join. That is, after determining a driver table, join continuously to obtain the result set and then continue to join. So the order of Join is important.
The index only knows that the data structure is B+Tree, which is really sad. So check it out and find a good article.
Priority of content-Type in browser meta Charset and Response
This one is confusing, and you should actually recall this one,
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Abbreviations are
<meta charset="utf-8" />
The http-equiv attribute, which corresponds to the HTTP Response Headers item, is intended to allow sites that cannot (for example, do not have permission to) set the server header to tell the browser about the content of the page.
Knowing the above, we know that the latter must have a higher priority.
To sum up, naked face mutilation, Ali’s interviewer is definitely a technical master, a word against principle, touch the soul. Reflect on yourself or do too much application, protocol ah operating system ah or forget fast, no understanding of the system. We should review the old and learn the new.