2018 Ali cloud operation and maintenance engineers face questions

1, the landing site is slow what is the reason?

  answer:

  1.   Network bandwidth, which is a very common bottleneck.
  2.   cpu, hard drive, memory configuration is too low, the server load it up.
  3.   Website development code is not perfect, such as mysql statements are not optimized, resulting in the database to read and write quite time-consuming.
  4.   Bottlenecks in the database. When the data in our database is becoming more and more, so be sure to read the pressure becomes large databases.

  2, a and b are not on the same network server how to set? After setting also ping illogical how the investigation?

  answer:

  AB server not on the same network segment

  The first server in a different IP segment allocated to different vlan

  In connection by adding virtual IP routing it through a different segment of the three-tier exchange vlan

  3, AB between two servers do use routing software to configure the router c two network cards and turn their routing through a server c

  answer:

  vi /etc/sysconfig/network-scripts/ifcfg-eth0

  View the card name card status IP -a -s

  A card-related information server settings

  Subnet Mask: 255.255.255.0

  IP=10.0.0.1

  Gateway = 10.0.0.254

  NIC restart to take effect

  View the routing information

  route -n

  Add the corresponding routing

  route add -net 10.0.1.0/24 gw 10.0.0.11

  Provided information about the server B

  IP=10.0.1.10

  Gateway 10.0.1.254

  NIC restart to take effect

  route -n

  Add corresponding routing

  route add -net 10.0.0.0/24 gw 10.0.1.11

  Two card C server

  NIC 1

  IP=10.0.0.11

  Gateway = 10.0.0.254

  NIC 2

  IP=10.0.1.11

  Gateway = 10.0.1.254

  NIC restart to take effect

  route -n

  we /etc/sysctl.conf

  net.ipv4.ip_forword = 1

  4, A and B in the traceroute command to add them IP on

  To permanent in

  vi /etc/sysconfig/network-scripts/ifcfg-eth0

  10.0.1.0/24 via 10.0.0.11

  10.0.0.0/24 via 10.0.1.11

  5, if nowhere PING how to troubleshoot

  First, take a look at the network interface failure is not crystal head or network interface cards caused by poor contact, then check switches and routers and other network equipment is faulty

  Whether to close the firewall and selinux mechanism

  And then view the card and routing and gateway is configured correctly.

  6, ping ping through your site, how to troubleshoot?

  There are three reasons

  1.   Other restrictions prohibit the ping
  2.   Can not resolve the host name and address of the website
  3.   Network anomaly can not reach the target host and IP ping

  7, docker commonly used commands, principles, principles of bridge mode?

  Operating modes: bridging mode, nat mode, host mode

  8, docker container ping nowhere What is the reason?

  ifconfig look docker0 bridge, ping about the bridge to see if pass. There may be a bridge configuration issues

  weave router port 6783

  1.   Server Installation docker container not turn off the firewall (access at installation docker physical machine, is it possible to access, if you can not access becomes not access the docker)
  2.   docker when creating the mirror did not do port mapping (this happens can access a physical machine can not access the docker) using dockers ps view the port mapping for mirroring
  3.   Port mapping is incorrect
  4.   Check to see if the network configuration can ping ping the bridge, the bridge may be the reason

  9, see the firewall status?

  answer:

  service iptables status

  systemctl status firewalld

  10, $ symbol?

  answer:

  The implementation of this program name $ 0

  $ N the n-th parameter values ​​ins, n = 1..9

  $ * This program is for all parameters, this option can be more than nine parameters.

  $ # Number of parameters of this program

  $$ The program's PID (script that runs the current process ID number)

  $! PID (process running in the background of the last process ID number) on the implementation of a directive of the background

  $? Executing a command return value (final command to display the exit status of 0 means no error, any other value indicates an error)

  $ - Displays the current use of shell option, and set the same command function

  $ @ $ * With a similar, but can be used as an array

  awk -F {print $ 3} script name

  11, if within a host can not access the office (open site), please give your troubleshooting steps?

  1.   First, determine whether the physical link Unicom normal.
  2.   Check the local IP, set up the routing, DNS whether the target.
  3.   WEB telnet server checks have not turned on and the firewall is blocking.
  4.   ping the gateway, perform the most basic checks, pass, it represents able to reach the server.
  5.   Typically the test gateway or router, the gateway first measure, and then measuring a test level router.
  6.   Public network ip ping test is usually the case (remember a few external IP),
  7.   DNS test unobstructed. ping the corresponding IP.
  8.   After checking the above, check the router also network management.

  12, if we open the site please say slow down your troubleshooting ideas?

  First, determine the cause

  First of all I want to visit our website as a user, determine the problem in our own reasons, or the user side of reason.

  (A), if the user is a problem for several reasons

  1.   User bandwidth over there
  2. Low user's browser version, too many plug-in installation
  3. Poisoning and computer junk files too
  4. Host users host operating system and performance

  (B) if the site itself is the problem we have for several reasons

  1.   Network bandwidth
  2.   Server cpu, hard drives, memory is too low server load it up is to say the performance of the server itself
  3.   Website code is not perfect. Such statements are not optimized mysql database resulting in time-consuming to read and write
  4.   The server does not open the image compression
  5.   Web audience
  6.   Dead too many connections and the use of plug-js file called frequent web server speed or rent a space where the server speed

  (Three), Solutions

  1, the speed of the speed detection server

  ping command to check the connection to time and packet loss servers (ping test URL)

  See packet loss rate (packet not throw 1000 is the best one, generally a good room speed packet loss rate does not exceed 1%)

  ping value to the average small city telecommunications adsl ping must not exceed 20, generally in the 10 provinces of the average of 20-40 is normal

  To ping uniform minimum and maximum values ​​differ too unstable performance Routes

  2, view the server's own performance

  • View cpu usage uptime
  • Check-memory conditions free -m
  • View I / O read and write iostat disk I / O read and write and see that process a lot of system resources resulting in slow my server

  Take a look at the most visited URL and IP What features, if a malicious URL and IP took his mask off if well-intentioned it may be the limiting CDN back to the source is greater cause can not access the site

  3, on the same server to see other sites open faster, and you can view your site and the number of URLs on the same server can see them through the open query tool speed

  4, Telecom and China Unicom visits issues

  If it is faster or slower open space, sometimes that is not open-space unstable vendor solution or find space for space injury, if it is in some places fast in some places should be slow network line problems, such as telecommunications users access on Web sites on the server Unicom, China Unicom users visit the site on a server on the telecommunications, resolve to do it is: use double space or multi-line space

  5, from the site itself causes

  •   Programming structure of the site is reasonable whether due to the impact of the code slide open the website speed (look for relevant parties to solve programming)
  •   Web page design structure and code errors (please professionals modification)
  •   Content of the page, such as: large pictures, large flash, too many references to other site content, site speed is slow If the referenced content, but also to influence their own website. For example Link can put the other side of the picture on your site

  Solution

  1.   Optimize your images, image size limit size, lower picture quality, reduce the number of pictures
  2.   Defined image formats: jpg, png, gif
  3.   Reduce the number of http requests (browser will be issued when many objects open page request, each object loaded will be delayed, if a lot of objects on the page will spend a lot of time, remove unnecessary objects, will close the synthesis of a picture, merge css file)

  13, NTP protocol network in the world

  The location of the configuration file vi /etc/ntp.conf

  210.72.145.44 National Time Service Center server

  Allow other machines within the network time synchronization

  restrict ip mask

  China is the world's most active server side

  server ip

  Allowing the upper world server actively modify the native earth

  The external world server as unavailable as this unit world world service

  View synchronization status ntpstat world

  The client update -u ip sync time

Guess you like

Origin www.cnblogs.com/forever521Lee/p/11137620.html