What is the difference between the RUN and CMD commands in a Dockerfile?
Python
def get_current_user(user_id: int): user = users.get(user_id) if user is None: raise HTTPException(status_code=404, detail="User not found") return user @app.get("/users", response_model=list[User]) def list_users(): return [User(*user) for user in users.list()] @app.get("/users/me", response_model=User) def read_current_user(current_user: User = Depends(get_current_user)): return current_user
There are two services — registration and order management. A new user creates an order and immediately registers. How to link these events so that the order is not created if registration fails?
Are you familiar with distributed transactions? How do orchestration and choreography differ in microservices?
What does the execute permission mean for a directory in Linux?
How does hash index work? Why does it have such high speed?
In what formats is data transmitted and stored when interacting with NoSQL databases?
What data transfer protocols are used in NoSQL databases (Redis, MongoDB, Elasticsearch)?
Does the order of fields in a composite index matter in relational databases?
Do you have experience working with Kubernetes and at what level?
What HTTP request methods do you know and what are they used for?
Why is indexed search faster and by how much? Compare search without index, with B-tree index, and with hash index.
What is the difference between PUT and PATCH? How should the server respond if not all fields are sent with the PUT method? Provide a real case of using PATCH.
How to update a high-load microservice to a new version without losing requests? What to do if the database migration breaks the old version?
What is Ingress in Kubernetes?
What non-relational DBMS do you know and for what tasks are they used?
How are permissions for folders and files arranged in Linux?
What do you pay attention to during code review?
How to set access rights in Linux using numbers (chmod)?
What are the disadvantages of JWT?