China Mobile Suyan (Mobile Cloud) interview (part)

first round

  • Self introduction
  • The difference between the sleep method and the wait method
  • Give an example of what situations will cause mysql full table scan
  • How is the performance of kong gateway? Have you compared it with APISIX?
  • The process of JVM loading classes
  • The process of development and release. Reference answer: First-tier manufacturers: summary of the process from demand proposal to launch (1) :
    insert image description here
  • Have you done encryption and decryption for the internal calls of your platform? Review: It should be jwt
  • Refactoring
  • Have you done interface optimization and performance optimization for long calls?
  • Several types of mysql logs and their uses

second round

  • Advantages of k8s deployment over traditional non-container deployment
  • What types of services have been used? ClusterIP, NodePort, LoadBalancer, etc.
  • The size of the k8s cluster used by your company (referring to the underlying IAAS layer)
  • Has python ever used Answerable?
  • Has the log collector in ELK experienced OOM?
  • surveillance system? I answer: Collector CAdvisor + time series database Prometheus + visualization tool Grafana. The interviewer actually told me the opposite. I remember very clearly that there was no reverse, and I checked the materials later, and it was not me who did the reverse.
  • Have you encountered any problems in the use of mysql, such as too much access to the connection pool, the connection cannot be connected, or the synchronization problem of the library
  • If the heap memory is less than 32G, what will happen to the JVM, and what will the object header enable by default? Reference answer: pointer compression.

Let’s talk about the implementation principle of JAVA pointer compression (illustrations and texts, let you understand in seconds) This article understands part of it, but I always feel that some problems are not explained thoroughly. For example, according to the logic in the text, I understand that pointer compression uses 8-byte alignment, so a 32-bit system can address 32G memory. But this is how to come to the conclusion that the heap memory of the 64-bit system exceeds 32G, and the pointer compression fails. The addressing space of a 64-bit system should be the square of the 32-bit system.

  • What is the suffix of the file exported by jmap?
  • How to do springboot unified authentication. A: Filter. Q: If you only want to authenticate several methods, use AspectJ, do you know how to do it?
    I summarize a few key points (the following code reference 1 2 ):

@Aspect aspect class ,
@Pointcut pointcut : The aspect class defines the method decorated with @Pointcut, and uses the pointcut expression function to describe which Join points (connection points) to use advise. like:

	@Pointcut("@annotation(com.xys.demo1.AuthChecker)")
    public void pointcut() {
    
    
    }

@Advice Advice, or enhancement . like:

	@Around("pointcut()")
    public Object checkAuth(ProceedingJoinPoint joinPoint) throws Throwable {
    
    
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
                .getRequest();
 
        // 检查用户所传递的 token 是否合法
        String token = getUserToken(request);
        if (!token.equalsIgnoreCase("123456")) {
    
    
            return "错误, 权限不合法!";
        }
 
        return joinPoint.proceed();
    }

The custom annotation AuthChecker.java is used to locate the cut point:

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface AuthChecker {
    
    
}
  • Design a current limiting mechanism, have you seen the source code of Hystrix?
  • Have you ever written a spring boot starter?
  • Why should the new generation of JVM be divided into Eden area and Survivor area
    for review: I searched for information on this issue, and there are many almost the same documents on the Internet: "If there is no Survivor, every time Minor GC is performed in Eden area, the surviving objects will be sent to To the old age... The meaning of Survivor is to reduce the number of objects sent to the old age, thereby reducing the occurrence of Full GC." I don't think it makes sense to explain this paragraph, why if there is no Survivor, every time a Minor GC is performed in the Eden area, the surviving The object will be sent to the old generation? It has been recycled in the Eden area, and the age exceeds the threshold before being sent to the old generation, isn't it the same?
  • Are you familiar with CICD basic tools?
  • How microservices are deployed to k8s. What address is stored in Consul, Pod address, Service address, or what? Review: Pod address. You can refer to: Several schemes for deploying grpc in the k8s environment
  • Has docker compose been useful? What is the difference between CMD and EntryPoint in DockerFile?

  1. https://blog.csdn.net/limengliang4007/article/details/78660834 ↩︎

  2. https://cloud.tencent.com/developer/article/1351205 ↩︎

Guess you like

Origin blog.csdn.net/qq_23204557/article/details/129133969