Can you describe a simple app request flow?
What is load balancer?
( We send request to Load Balancer before actual server).
A load balancer evenly distributes incoming traffic among web servers that are defined in a load-balanced set.
• If server 1 goes offline, all the traffic will be routed to server 2. This prevents the website from going offline. We will also add a new healthy web server to the server pool to balance the load.
• If the website traffic grows rapidly, and two servers are not enough to handle the traffic, the load balancer can handle this problem gracefully. You only need to add more servers
to the web server pool, and the load balancer automatically starts to send requests to them.
What do you need to consider when you’re using cache?
What is single point of failure (SPOF)?
“A single point of failure (SPOF) is a part of a system that, if it fails, will stop the entire system from working”
What is Eviction Policy cache?
Once the cache is full, any requests to add items to the cache might
cause existing items to be removed. This is called cache eviction.
What is Content delivery network (CDN)?
A CDN is a network of geographically dispersed servers used to deliver static content. CDN servers cache static content like images, videos, CSS, JavaScript files, etc.
Can you describe the whole CDN client -> server flow?
What are the difference between stateful and stateless architecture?
stateful - should contain information about the user on the server ( in the server memory, if the server down we lose data and we can’t scale horizontally) and depends on the previous requests
stateless - send information from the client ( session) and doesn’t save it to the server ( save to the database )
What is database sharding? What problem can appear?
Sharding separates large databases into smaller, more easily managed parts called shards. Each shard shares the same schema, though the actual data on each shard is unique to the shard.
What is rate limiter?
In a network system, a rate limiter is used to control the rate of traffic sent by a client or a service. In the HTTP world, a rate limiter limits the number of client requests allowed to be sent over a specified period. If the API request count exceeds the threshold defined by the rate limiter, all the excess calls are blocked. Here are a few examples:
• A user can write no more than 2 posts per second.
• You can create a maximum of 10 accounts per day from the same IP address.
• You can claim rewards no more than 5 times per week from the same device.
What is API gateway?
Cloud microservices have become widely popular and rate limiting is usually
implemented within a component called API gateway. API gateway is a fully managed service that supports rate limiting, SSL termination, authentication, IP whitelisting, servicing static content, etc.