May 30, 2021 Article blog
Be able to use shell scripts smoothly to do a lot of automated work; awk/sed/perl is also doing a good job, doing a lot of text processing and statistics; basically installing large parts of non-special Linux programs (including libraries, packages, third-party dependencies, etc., such as MongoDB/Redis/Sphinx/Luncene/SVN);
On the basis of the first phase, learn about more complex Nginx configurations, including multicore configurations, events, proxy_pass, sendfile/tcp_ configurations, know the associated configuration and performance impact such as timeouts, and know that nginx, in addition to web server, can assume proxy server, Configure configurations such as static servers, know the basic nginx configuration tuning, know what to configure permissions, compile an nginx to extend to nginx, know the basic nginx operating principles (master/worker mechanism, epoll), know why nginx performance is better than apache performance, and so on;
On a first-phase basis, there are a number of tips on MySQL development, including general SQL optimization (group by/order by/rand optimization, etc.), the ability to back up MySQL data hot and cold in addition to building MySQL, and the knowledge of configuration options (such as key_buffer/query_cache) that affect innodb/myisam performance sort_buffer/innodb_buffer_pool_size/innodb_flush_log_at_trx_commit, etc.) and know how well these options are configured to fit, and how many special configuration options are appropriate, such as knowing how to build mysql master-from-sync environments, knowing the regions of each binlog_format, knowing mySQL performance traces, including slow_log/explain, etc. Y ou can also learn about basic index-building processing, the basic MySQL architecture (Server-storage engine), the basic InnoDB/MyISAM index storage structure and differences (cluster index, B-tree), the basic InnoDB transaction processing mechanism, and the handling scenarios for most MySQL exceptions (or where to find them). Where conditions permit, it is recommended that you understand the MongoDB database represented by NoSQL and, by the way, compare the differences with MySQL, where colleagues can safely and carefully use MongoDB in the right scenario and know that basic PHP is developed in conjunction with MongoDB.
Cache processing is bound to be involved in most midsize systems, so it's important to understand the basic caching, know the similarities and scenarios of Memcached and Redis, be able to install Redis/Memcached independently, understand some of the basic features and limitations of Memcahed, such as the maximum value value, know that PHP is combined with their use, Redis understand the basic workings and usage, understand the general data types, know what scenarios are applied, understand Redis transactions, and so on. In the principle section, you can get an overview of Memcached's memory structure (slab mechanism), redis understands the underlying implementation storage structure of common data types (SDS/link/SkipList/HashTable) and so on, and by the way, it's better to understand Redis's transactions, RDBs, AOF, and so on
In addition to the first phase of the capabilities, the installation configuration is free to install PHP and various third-party extensions of the compilation installation configuration, understand most of the configuration options and implications of php-fpm (such as configurations that affect performance such as max_requests/max_children/request_terminate_timeout), know the difference between mod_php/fastcgi, and have become proficient in various basic techniques in PHP, including a variety of in-depth PHP, including PHP object-oriented in-depth understanding/SPL/grammar level specialities such as reflection, etc.; have read at least one or more general PHP MVC framework code in terms of frameworks, know the implementation mechanisms and design ideas within the basic PHP framework; and have been skilled enough in PHP development to apply development (abstract factory/single case/observer/command chain/strategy/adapter, etc.); The PHP MVC framework fully liberalizes development, gives itself an in-depth understanding of the MVC model, and enables it to upgrade quickly in business project development;
Ability to design web architecture, database, basic PHP framework selection for most medium-sized systems, performance test troubleshooting, etc.; Ability to do similar: browser -> CDN (Squid) - > Nginx-PHP -> cache - > database Basic design and development and maintenance of structured websites, able to support the development and maintenance of basic websites with millions to tens of millions of traffic per day;
Focus: In addition to the basic LNMP program, you can also learn in depth in a certain direction or area. (Deep dimensional development)
Objective: In addition to being able to complete basic PHP business development, it can solve most of the in-depth and complex technical problems and design large and medium-sized system design and development work independently; (e.g. in mySQL, Nginx, PHP, Redis, etc.)
In addition to the second phase of capabilities, under Linux, in addition to regular operations and performance monitoring tracking, there are many advanced and complex commands (watch/tcpdump/starce/ldd/ar, etc.), and in shell scripts, more complex shell scripts (more than 500 lines) have been able to assist with many tasks including backup, automated processing, monitoring, and so on shell; applications such as awk/sed/perl are already in full swing, able to manipulate and control the processing of text statistical analysis of data in a variety of complex formats; have some understanding of Linux internal mechanisms, have a basic treatment for kernel module loading, startup error handling, etc.; and understand other related things, such as NFS, disk management, etc.;
On the basis of the second phase, it has been able to operate Nginx very skilled, can carry out more in-depth operation and maintenance work on Nginx, such as monitoring, performance optimization, complex problem management, etc.Nginx internal event processing, memory management, and so on, while learning about the development of Nginx extensions, you can customize some of your own private extensions, and you can have a certain understanding of Nginx plus Lua to see if you can combine better patterns to apply, and this phase requires an in-depth understanding of the Nginx principles, considering becoming an in-depth professional in the direction of Nginx.
On the basis of the second phase, in mySQL applications, in addition to the previous basic SQL optimization, but also in the completion of some complex operations, such as large-volume data import and export, online high-volume data change table structure or add or delete index fields and other high-risk operations Understand, be familiar with mySQL's core key technologies, such as transaction mechanisms (isolation levels, locks, etc.), have some understanding and application of technologies such as triggers, partitions, and include disk optimization (SAS migration to SSD), server optimization (memory, server configuration), and other core performance optimization options (innodb_log_buffer_size/back_log/table) in mySQL performance _open_cache/thread_cache_size/innodb_lock_wait_timeout, etc.), connection pool software selection application, in-depth knowledge of the operating statements of the show status/show profile class, able to track down most of the performance issues, in-depth familiarity with MySQL backup technology, including disaster preparedness, in-depth understanding of Binlog, hot and cold backup, multi-IDC backup, etc., and more understanding of MySQL principles, such as MySQL principles The working mechanism of SQL begins to read some of the source code, such as the source learning from the main synchronization (copy) technology, or the source learning understanding of a storage engine (MyISAM/Innodb/TokuDB) and so on, and if conditions permit, you can refer to the CSV engine to develop your own simple storage engine to save some data and enhance your understanding of MySQL; Y ou can also consider moving towards DBAs. M ongoDB level, you can consider, for example, in the case of writing less read more to start using MongoDB online, or do some online data analysis processing operations, specific scenarios can be done according to the work, but the core is to better understand the RMDBS and NoSQL of the different scenarios below the application, if conditions or interests allow, you can start to learn more about mongoDB's working mechanism.
On the basis of the second phase, we can apply and learn more deeply. B ecause Memcached is not particularly complex, it is recommended that the source code be read, especially the memory management section, for easy in-depth interpretation, and the Redis section, which can do more complex data structure applications (zsets do leaderboard sorting operations/transactions to ensure atomicity in second kill scenario applications and other operations); Such synchronization mechanisms of learning applications, design a highly available Redis application architecture and clusters, it is recommended that you can deeply learn about Redis source code, the knowledge accumulated in the second phase can be applied, in particular, you can read including core event management, memory management, internal core data structure and other full learning to understand. If interest permits, you can become a very professional user of Redis.
As a fundamental core skill, we build on the second phase and need to have more in-depth learning and application. F rom the top of the code base application, it solves 95% of the problems encountered in PHP development, understands most PHP techniques, understands the advantages and disadvantages of most PHP frameworks quickly in a day, and understands the pros and cons of various mainstream PHP frameworks, and quickly facilitates technical selection in project development, and in terms of configuration, in addition to the knowledge of the general second phase, you will know something Compare biased configuration options (php auto_prepend_file/auto_append_file), including some complex advanced configurations and principles in the extension (such as memcache.hash_strategy in the memcached extension configuration, apc.mmap_file_mask/apc.slam_defense/apc.file_update_protection in the apc extension configuration, etc.); Working mechanisms (e.g. php-fpm opening process count calculations and principles under different configuration machines), basic familiarity with the zend engine (vm/gc/stream processing), reading basic PHP kernel source code (or reading related articles), knowledge of most of the core data structure (base type/Array/Object) implementation of phP internal mechanisms, and knowledge of the core infrastructure (zval/hasht able/gc) has an in-depth understanding, the ability to develop basic PHP extensions, mid- to high-level knowledge of extended development (minit/rinit, etc.), familiarity with the details of php's different communication interactions with apache/nginx (mod_php/fastcgi), and, in addition to developing PHP extensions, consider learning to develop Zend extensions and learn about PHP from a lower level.
On the basis of the second phase, it is possible to have a deeper understanding of the C/C?language, to complete the development of small and medium-sized C/C?systems, to learn some special data structures (b-tree/rb-tree/skiplist/lsm-tree/trie-tree, etc.) in addition to the basic C/C?s syntax and data structure of the basic second phase, and to facilitate the need for special work Thread programming, multi-process scenarios to understand most of the multi-process communication methods, flexible choice of communication methods (shared memory / semaphine / pipeline, etc.), multi-line programming can be a good solution to lock conflicts, and can carry out the development and debugging of multithreaded programs, while network programming is familiar with the multi-process model / multi-threaded model / asynchronous network IO model differences and selection, familiar with the principles and differences of the different asynchronous network IO model (poll / epoll / i iocp, etc.), and familiar with common asynchronous frameworks (ACE/ICE/libev/libevent/libuv/Boost.ASIO, etc.) and use, if leisure can also look at some of the domestically developed libraries (e.g. mudoo); Concurrent, front-end communication protocols, service monitoring), knowledge of RPC communication issues for each back-end service (struct/http/thirft/protobuf, etc.); thread pool, etc.), but whether to apply caution after development, save the buried pit to chase bugs;
In-depth understanding of HTTP protocols (including various detailed protocol special protocol code and behind-the-scenes reasons, such as 302 static file cache, 502 is nginx after php hanging and so on);
In the basic PHP/C/C plus language has a basic accumulation, it is recommended that at this stage you can try to learn different programming languages, see personal interests, scripting languages can learn Python / Ruby and so on, functional programming languages can try Lisp / Haskell /Scala/Erlang or something like that, static languages can try Java/Golang, statistical analysis can understand the R language, if you want to do back-end business from a different perspective, you can try Node.js and the aforementioned Nginx_Lua combined with Nginx, etc. Learning different languages is primarily about improving your horizons and differences in problem solving, such as understanding that there are lightweight co-processes in addition to processes/threads, for example, in cross-machine communication scenarios, Erlang's solutions are simple and amazing, and for example, when you don't want to choose C/C, there are similarly efficient Erlang/Golang available, and so on;
In this phase, in addition to basic LNMP skills, some other areas of knowledge will be considered, all of which are possible to look at personal interests and long-term goals. A t present, there are many areas to choose from, such as cloud computing (distributed storage, distributed computing, virtual machines, etc.), machine learning (data mining, pattern recognition, etc., applied to statistics, personalized recommendations), natural language processing (Chinese word breakers, etc.), search engine technology, graphics images, speech recognition, and so on. In addition to these tall, there are many engineering aspects to learn, such as high-performance systems, mobile development (Android/IOS), computer security, embedded systems, hardware and other directions.
System design on the basis of the second phase, can apply the experience skills, design more complex medium and large systems, can solve most of the problems of various complex systems on the line, complete similar browsers - > CDN - > Load balancing - > access layer -> Nginx-PHP -> Business Cache - > Data Library -> Complex back-end RPC interactions (storage back end, logical back end, anti-cheat backend, external services) - > more complex business of back-end sauce purple, supporting the normal development and maintenance of websites with tens to hundreds of millions of traffic per day.
The following diagram summarizes the more detailed, from the basic to the advanced have the corresponding introduction, we can save the picture carefully studied
Recommended good lessons: PHP Introduction: Ten days to learn PHP, PHP micro-courses