ARTS punch card program (the second week)

  • Algorithm. Mainly to program training and learning. At least a week to do a leetcode algorithm problems (start Easy to start, then Medium, and finally Hard). Training program, if you do not train your book look more algorithms, you still will not do arithmetic problems, after reading the book, you need to train. Leetcode do about the advantages, you can look at my article on coolshell Leetcode training program - the cool shell - CoolShell (within one hour);

  • Review: mainly to learn English, if your English is not, you basically missed the technical expert. So, you need to read and review at least an English technical articles, my personal favorite place to go is Medium (need ×××, other communities can learn the official documents and papers) as well as each company's technology blog, such as Netflix's (30min);

  • Tip: mainly to review and summarize the knowledge that you are often encountered at work. Learning at least one technical skills. Your problems at work, stepped pit, learning bit by bit knowledge (you can also learn practical courses on time [geeks]);

  • Share: mainly to build your influence, can output values. Share ideas and think there is a technical article, it can be technical summary of the article.

Only you begin to think for themselves, to start their own review and summarize, people start looking for exchanges and discussions, start practicing and start external output, you will grasp the real learning ability

So, instead of trying to learn to read more books, the blind pursuit of speed and volume of reading, which would create the low level of diligence and a growing feeling that this is only in the brute force. To speculation, to practice, to review and summarize, otherwise you just mechanically repeats the same thing (remember knowledge), without the quality of growth.

On the ability of replication

Focus on how to make their own ability to judge the whole, in this regard, rat t own training as follows:

  1. For a scenario, a variety of manufacturing problems or problems;

  2. For a question, trying to find as many solutions and compare the advantages and disadvantages of these solutions;

  3. For a solution, we are trying to find a variety of different test cases in an attempt to let it robust.

The ability to learn by analogy, can be broken down as follows: 
Lenovo capacity: the ability to exercise that requires you usually just kept thinking different uses of the same thing, or association with other things related. The same goes for software development and technology learning; 

abstraction: abstraction is giving top priority to basic skills. Usually when you solve the problem, if you can abstract on this issue, you can get more representation. 
Ability to abstract universal model need to find solution to the problem, such as mathematics is an abstraction of the real world. As long as we can establish the real problems of the world into a data model (such as the establishment of various dimensions of the vector), 
we can use mathematics to solve, which is the essence of machine learning; 

introspection capabilities: the so-called introspection is their ability to find their own ugly. When you get a solution, when to stand on its own antithesis to find solutions to this vulnerability. A bit like a right-hand man Bo. This debate himself and his 
ability also known capacity for critical thought. Themselves split into positive and negative side, right and left, and even multi-party, standing up different positions and their own debate, so do not lose a a case, in order to obtain a complete and comprehensive problem analysis. 
If you want to get these three capabilities, but you should really like to find other people to think and debate or discussion beyond, but also on your own really good at thinking, if there is curiosity, whether they would like打破沙锅问到底, whether 
like attention details, whether things seriously, whether rigorous ......

1、Algorithm

Write a SQL query, the condition: no matter whether the person has address information, we need to provide the following information based on the person of two tables:

Table 1: the Person 
+ ------------- + --------- + 
| Column Name | Type | 
+ ------------- + + --------- 
| PersonId | int | 
| FirstName | VARCHAR | 
| LastName | VARCHAR | 
+ ------------- + --------- + 
PersonId is the primary key  
table 2: the Address 
+ ------------- + --------- + 
| column name | type | 
+ --------- + --------- + ---- 
| AddressID | int | 
| PersonId | int | 
| City | VARCHAR | 
| State | VARCHAR | 
+ ------------- + + --------- 
AddressID table's primary key is the 
 select FirstName, LastName, City, State from Person left join Address on Person.PersonId = Address.PersonId 
 mainly on the associated SQL query knowledge, generally associated with the query select clause can be used to achieve other structured more clearly associated with the use of tables, divided into 
 inner connection ( inner join), 
 left connection (left join) the connection is to the left of the left of the table tuples all elected
 Right connection (right join) the connection is to put the right data to the right of the table all out, regardless of whether the left side of the table matches the data: 
 fully connected (full join) the data about the two tables are taken out, regardless of whether the match: Descartes product 
 
 title: person regardless of whether address information in table 2 indicates whether there are data to be used so that output left join

2、Review 

https://www.percona.com/community-blog/2019/05/06/percona-live-presents-first-ever-tidb-track/

Percona Live Presents: The First Ever TiDB Track

3, Tip / Techni (shell grep, awk, sed) related skills

    Before a line fault, mistake production servers into the next frame in the queue, and the entire process in order to avoid post-shelf IP address conflict, network card configuration file will ONBOOT = yes instead ONBOOT = no, the late start to appear and restart the machine after not start the problem, you need to check the batch. And repair. Write a simple little script.

! # / bin / the bash 
# Check the virtual machine NIC profile ONBOOT state 
Result = `CAT / etc / sysconfig / Network-scripts / the ifcfg-eth0 | grep ONBOOT | awk -F = '{Print $ 2}'` 
IP = `IP a | grep 'scope global' | grep br | egrep -v ': |. 192.168.122 | 192.168.0' | sed -r 's /.* inet \ /.*/ \ 1 / (*.)' | -v egrep '$ 0.1' | uniq | head -n 1` 

echo "$ ip the Result ---- $" 

related to the repair: 
sed -i "S / ONBOOT = NO / ONBOOT = yes / G" / etc / sysconfig / network-scripts / ifcfg-eth0

4, Share some thoughts about high availability disaster recovery

Two three vs Heart Center Weighted places to live

  Different business needs SLA, high-availability architecture, common OA system and online payment system high-availability architecture, SLA is certainly not the same, OA system failure, at worst short-term internal staff can not access it, as long as the data is not lost, there is no big problem, but the business of online payment system failures like, the enterprise production environment is a serious failure or accident, according to different fault conditions, different to bear losses.

What are the three centers in two?

    Refers to two city, remote, three centers refers to the production center, city disaster recovery center, remote disaster recovery center. In recent years, combined with large-scale natural disasters, domestic occurrences to double the city center plus off-site disaster recovery center, "two three centers' disaster recovery mode also will appear, disaster recovery and high availability capabilities of both this program. Twin city center refers to the establishment of two independent bear critical systems running data centers, two centers have basically the same service processing capability and high-speed links through real-time synchronization of data in the same city or nearby cities, everyday situations can simultaneously manage and share business operation of the system, and the switching operation; case of disaster emergency disaster recovery can be switched without substantially without loss of data, to maintain continuous operation of the business. Compared with the site disaster recovery mode, bis city center a low investment cost, building speed, operation and maintenance management is relatively simple, the advantages of higher reliability. Off-site disaster recovery center is built on the city off-site disaster recovery center a backup for double data backup center, when natural disasters and other causes of malfunction occurs two-center, off-site disaster recovery center can conduct business with backup data restore

What are the different places to live:

The so-called "active-active" or "live" data center, the data center is different from the conventional pattern and disaster recovery center, the former two, or a plurality of data centers which are in operation, the same applications run, with the same data, can be provided load balancing across the central business operation capability, to achieve continuous application availability and disaster recovery capabilities, so called "double live" and "live"; the latter is put into operation production data center, disaster recovery data center in an inactive state, only when a disaster occurs, the production data center to fail, disaster recovery center was started.

image.png

The company is currently using remote dual live Shanghai + Hangzhou double room realized through cross-city private line connection, usually two rooms are to provide services between the two rooms, a single room when the failure, you can quickly switch to another room, fast stop.


Often the problems encountered:

1, network problems Waduan line, resulting in a double room data synchronization delay

2, part of the application in a non-active state, there is room only Shanghai or Hangzhou room there is, there are some applications only a single live, two data centers only provide a normal service

3, when it encounters an error by switching DNS is too slow, resulting in some customers affected by the longer time

https://www.infoq.cn/article/JiJ5xfo*gUT5X6OrQv3l   share a cloud computing-related documents



Guess you like

Origin blog.51cto.com/dreamlinux/2404033