UFIDA Java Architect Interview

  • Self introduction. Some optimizations in the project. Q: How to ensure the timing of Kafka messages? A 1 :
    insert image description here
    The core meaning is to achieve local ordering. Messages that need ordering should be set with the same key, so that they will be assigned to the same partition after taking the modulo by hashing. And because a partition can only be consumed by one consumer in a consumer group, order can be achieved.
    My own follow-up question: In order to ensure the reliability of sending messages, the producer's reties is set to >1, which causes messages to be out of order. How to solve it? Refer to answer 2 : set max.in.flight.requests.per.connection = 1. Because (also found in Conduktor Kafkademy: Kafka Producer Retries ):

The maximum number of unacknowledged requests the client will send on a single connection before blocking. Note that if this setting is set to be greater than 1 and there are failed sends, there is a risk of message re-ordering due to retries (i.e., if retries are enabled).

Obviously, this setting may reduce throughput

UFIDA asked: Is there no orderly control from the terminal? I looked through the information and guessed that he might want to ask this: Kafka guarantees the orderliness of data Summary : Through the previous method A1, when consumers get the messages, they are in order, but after getting the messages, they start multi-threaded consumption. This will lead to disruption of order. The method proposed by the author: imitate the method of kafka partitioning, after the consumer gets the message, take the message according to the hash value of the key, put it in the blocking queue, and then one processing thread corresponds to one blocking queue?

  • What data is stored in redis
  • How to call between services? How many services are there? What should I do if the call between services fails? Is it useful for distributed transactions?
  • How is the division and architecture of the entire microservice designed?
  • Java memory model? Talk about how to tune the JVM
  • What are the components of Spring Cloud
  • Tell me about k8s you understand and the components of k8s
  • How to transfer service traffic to pod? Refer to answer 3 : kube-proxy. kube-proxy runs on all nodes, it monitors the changes of service and endpoint in apiserver, and creates routing rules to provide service IP and load balancing functions. Simply understand that this process is a transparent proxy and load balancer for Service, and its core function is to forward access requests to a Service to multiple Pod instances on the backend. Specific solutions include iptables or ipvs
  • Do you understand the life cycle of pod? Refer to answer 4 :
    insert image description here
  • Tell me about your entire go-live process from development to production. How to Align Between Microservices
  • How to Troubleshoot Online Problems
  • What problems have you solved that give you a sense of accomplishment?
  • How do you understand Zhongtai?
  • Know which architectural design options. DDD
  • Have any questions to ask. After a brief chat, I was very impressed with their company's thousands of services

  1. "Section 10 Kafka" of "Chapter 3 [Supplementary Information] Detailed Explanation of Common Message Middleware Applications" of "Special Topic 4 Service-oriented Transformation" ↩︎

  2. Kafka sequential message ↩︎

  3. Summary of common Kubernetes interview questions↩︎

  4. Kubernetes Learning Road (11) Pod Status and Lifecycle Management ↩︎

Guess you like

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