Load balancing scenario in the evolution of large websites, interview script of Java Software Engineers

mb61ab40ce80d9c 2022-01-15 03:23:13 阅读数:927

load balancing scenario evolution large

Increase in active users , Would be right DB Database access pressure is too high , At this time, I will consider Add a cache layer to help DB The relief . When planning for distributed caching , use redis Cluster as cache .redis In the cluster scheme Using hash slots , The amount of cached data has been split , And load balancing . This is The first ** Three load balancing scenarios **
 Load balancing scenario in the evolution of large websites ,java Software Engineer interview script

nginx colony

When users are concurrent for thousands of times , We have to consider nginx High availability , although nginx The performance of the system is relatively high , But it can't stand a lot . utilize LVS To achieve nginx High availability and load balancing , This is another load balancing scenario
 Load balancing scenario in the evolution of large websites ,java Software Engineer interview script

Large stage

The business has stabilized at this stage , The larger the amount of data , Users are also very active ; Business complexity is high , Business processes have changed , The market scale has developed to the whole country , Multi machine room and multi area deployment The needs of . When the company is large , Network security is particularly important . The system must be stable

Sub database and sub table

If the database single table exceeds 300 More than 10000 records , Will be Considering the sub table ; Database IO The operation has been in High load state , We can consider The business is split into different DB in , as well as The master-slave design of the database realizes the separation of reading and writing , Designed to reduce DB Load and high availability .

Two schemes can be adopted in sub database and sub table , A proxy layer scheme , Such as :MyCat frame ; One is the client implementation , Such as sharding-jdbc. This is another load balancing scenario at the database layer

 Load balancing scenario in the evolution of large websites ,java Software Engineer interview script

Message middleware

The complexity of the business is high , Need a good split business , Further business decoupling , And message oriented middleware will be used for high parallel transmission and lower current limit , Such as :RocketMQ,RabbitMQ.

And in distributed transactions , In order to ensure final consistency , Message oriented middleware is also used .

Message oriented middleware is naturally clustered , Ensure high availability and load balancing of message oriented middleware , Yes, this is the load balancing scenario of the message queue layer .
 Load balancing scenario in the evolution of large websites ,java Software Engineer interview script

gateway

Under distributed architecture , For unified routing , authentication , Current limiting , Monitoring etc. ; At this time, you have to go to the gateway , Now the gateway framework is :Kong,Zuul,GateWay,Soul etc. , These frameworks are also clustered . Deploy to nginx Below the floor (kong It can be replaced directly nginx, Because it's in nginx Designed on the basis of ) Set up gateway layer . This is the load balancing scenario of the gateway layer

Cross machine room

Business in the national market , Even in the global market , because ** Regional network nodes are set up according to regions

《 A big factory Java Analysis of interview questions + Back end development learning notes + The latest architecture explanation video + Practical project source code handout 》

【docs.qq.com/doc/DSmxTbFJ1cmN1R2dB】 Full content open source sharing

, Therefore, we should ensure that many regions can quickly access our website , This is the time to do Multi machine room design . The design of multi machine room is to use DNS, This is DNS Layer load balancing **

At this point , Generally in Under the same machine room , Several system cluster schemes will be deployed , At this time, we usually add... In the computer room Hardware load balancer , Such as :F5,A10; Hardware load balancer is quite expensive Of , But the company has grown to this point , Should have money .
 Load balancing scenario in the evolution of large websites ,java Software Engineer interview script

Involving cross machine room , System design will be very complex , In particular, take into account the machine room data How to share , Sync ? These points are always in Later articles will introduce , What problems should be solved in cross machine room ?

summary

One thing in common is that large systems No single point of failure is allowed , Clustering is needed , Once there is a cluster , There will certainly be load balancing scenario applications .

Development of large scale systems , It comes from business development , When the business has not reached a certain level , Choose the right system design , You can't choose a very complex scheme ahead of time , It will lead to a long development cycle , The system will also become complex , There is no need to , This is what the technology boss needs to pay attention to .

Last

Share a set of interview dry goods I sorted out , This document combines my years of interviewer experience , From the interviewer's point of view to tell you , The questions asked by the interviewer, what would he most like to hear from you , Share and help those friends who are confused about their future .

Interview experience skills

  • Experience and skill 1 How to answer the interviewer's questions skillfully
  • Experience and skill 2 How to answer technical questions
  • Experience and skill 3 How to answer non-technical questions
  • Experience and skill 4 How to answer quick estimate questions
  • Experience and skill 5 How to answer the problem of algorithm design
  • Experience and skill 6 How to answer system design questions
  • Experience and skill 7 How to solve the time conflict in job hunting
  • Experience and skill 8 If the interview question has ever met , Do you want to inform the interviewer
  • Experience and skill 9 Can I apply again after being rejected by the enterprise
  • Experience and skill 10 How to deal with the questions you won't answer
  • Experience and skill 11 How to deal with the interviewer's “ The method of agitation ” Language
  • Experience and skill 12 How to deal with the problem of holding different views with the interviewer
  • Experience and skill 13 What is workplace metaphor

 Load balancing scenario in the evolution of large websites ,java Software Engineer interview script

Interview questions

  • Detailed explanation of the real topic 1 A well-known Internet download service provider Software Engineer written test question
  • Detailed explanation of the real topic 2 A well-known social platform software engineer's written test question
  • Detailed explanation of the real topic 3 A well-known security software service provider Software Engineer written test question
  • Detailed explanation of the real topic 4 A well-known Internet Financial Enterprise Software Engineer written test question
  • Detailed explanation of the real topic 5 A well-known search engine provider Software Engineer written test question
  • Detailed explanation of the real topic 6 A written test for software engineers of a start-up company
  • Detailed explanation of the real topic 7 Written test questions for software engineers of a well-known game software development company
  • Detailed explanation of the real topic 8 Written test questions for software engineers of a well-known e-commerce company
  • Detailed explanation of the real topic 9 A top consumer website Software Engineer written test question
  • Detailed explanation of the real topic 10 A well-known portal software engineer written test question
  • Detailed explanation of the real topic 11 A well-known Internet Financial Enterprise Software Engineer written test question
  • Detailed explanation of the real topic 12 A well-known domestic network equipment provider Software Engineer written test question
  • Detailed explanation of the real topic 13 Written test questions for software engineers of a top mobile phone manufacturer in China
  • Detailed explanation of the real topic 14 Written test questions for software engineers of a top big data integrated service provider
  • Detailed explanation of the real topic 15 Written test questions for software engineers of a well-known social listed company
  • Detailed explanation of the real topic 16 Written test questions for software engineers of a well-known Internet company
  • Detailed explanation of the real topic 17 A well-known network security company campus recruitment technology pen test questions
  • Detailed explanation of the real topic 18 A well-known Internet game company campus recruitment, operation and maintenance development post pen test questions

 Load balancing scenario in the evolution of large websites ,java Software Engineer interview script

It's not easy to sort out the data , Pay attention before you go

This article has been  CODING Open source project :【 A big factory Java Analysis of interview questions + Core summary learning notes + The latest explanation video + Actual project source code 】 Included

版权声明:本文为[mb61ab40ce80d9c]所创,转载请带上原文链接,感谢。 https://javamana.com/2021/12/202112122302582707.html