In this zoom video, get ready to start with interview-ready tips.
Let's say there are 5-6 servers and there is a load balancer...
How are the requests monitored?
If we have authentication in the load balancer it becomes a gateway that checks whether a request is valid or not. If we need extra authentication needed( for example, only admins can send requests to a particular server), the question arises of where we should have the authentication logic.
If you are up for scaling then you must be opting Load Balancer Authentication.
The drawback of this method is that you will have to deploy a load balancer every time a request is sent.
Another drawback is that it is a single point of failure.
Who will handle authentication when the Load balancer is gotten rid of?
AuthService
We have an Auth service which takes in request from load balance them validates and send them back.
What if I tell you we have a video to explain this? Go ahead and watch the video on Authentication and Global caching under the High-Level Design.
Service Registry
If we are going to have a sidecar to take care of invalidation, how do you maintain the states? The consistency becomes a question. The state here is the cache that we use.
What is a sticky session?
Dive into the video on time stamp 23: 50 to know more.
Authentication for multiple systems works in different ways. The architecture-wise where you give the authentication matters in terms of performance.
You have a bunch of externally exposed services one of the things you can do is if it is coming from the service which is sending the request can say whether it needs to be authenticated or not.
If internal services are not talking to each other and the sidecar feels that the request need not be authenticated, the authentication can be bypassed.
Benefits Of Compression:
Lower bandwidth usage
Faster to send
Lesser memory being used
Why shouldn't we compress messages?
Computational overhead
Time-taking latency.
To know how to implement a file system in an interview dive into the time stamp- 1:19:00 and keep your knowledge caps open.
For this problem, we need to be creating :
1. Create(file_id, content)
2. Read(file_id)
3. Update(file_id, content)
4. Delete(file_id)
It's time for discovery. Go ahead, explorer. The zoom class answers this question!