Some System Design basics

Below are system design basics for software development:

  • How CDN works: CDN stands for Content Delivery Networks. CDN is a network of servers that distributes the content from original server to multiple locations by caching the content closest to the users’ locations.
  • Protecting passwords in a database: we should never store passwords directly into a database. These can be seen by database users. Also, these can be hacked. We should convert passwords into has values. To convert passwords into has values, we should use randomly generated salt values with each password. Salt is used to generate a unique hash.
  • Bare metal infrastructure: this is a term used for legacy physical server infrastructure. When an application needs the highest level of security, bare metals could be the most appropriate solution.
  • Virtual machines: This uses a hardware that is shared for multiple virtual servers. We use a hypervisor underneath guest OSs. The downside is that these could be vulnerable by noisy neighbor problems.
  • Containers: it’s a light weight stand alone package. We use a hardware and host OS. On top of it, a container engine is installed. On top of container engine, multiple containers are deployed. Containers are scalable and portable. Containers are less secured. They are vulnerable to security issues at OS level. To avoid security issues, we can run containers inside virtual machines.
  • How HTTP works: A user hits a URL on the browser. We use either http or https protocol. Second is a domain (like http://www.abc.com). We use a DNS (Domain Name Service) lookup to look for an IP for a domain. DNS information is generally cached. To look for a DNS, we have DNS servers. Finally a browser has the IP address of the server. Next, the browser get a TCP connection with the server. Browser sends a request to the server. Server sends an http response to the browser. Browser parses the responds and shows the response to the user on the browser.

References:

Software deployment strategies

This is a part of system design knowledge base. In this article, we’ll discuss production code deployment strategies.

To deploy an application code, there could be multiple strategies, depending on a business need. Here are few common deployment strategies:

Full deployments:

Below two are full deployment strategies in that we deploy the compete code base or services into the production.

  • Multi-Service deployment: In this deployment strategy, we deploy all services within an environment (or a node). An example could be a single full deployment into a monolithic environment. The downside of this deployment is that it’s difficult to rollback.
  • Blue-Green deployment: In this deployment strategy, we keep a staging environment. Production code is moved to staging and new code is deployed to production. In case of the rollback situation, we can migrate codebase from staging to production.

Partial deployments:

Below two are partial deployment strategies in that we deploy the partial code base or services into the production. That means, we do not change entire services or codebase for all the users. Let’s refer to two types of partial deployments below:

  • Canary deployment: I also call it a pilot or a beta program deployment. In this deployment strategy, we release the new services to a smaller user base. Beta program could be an example of canary deployment.
  • A/B deployment: In this deployment strategy, we release new features to some users as an experimental release.
  • Difference in Canary and A/B deployments: The intent of canary deployment is mitigating the risks by releasing new services to some users. If some selected users are able to. use a new service as expected, we can release the service to rest all users. However, the intent of A/B testing is to experiment a new feature or a service with some users, to learn the success of a new feature or a service.

References:

Sources for product manager interviews

Below are some useful links to prepare for product manager interviews:

As I learn more, I’ll update this page.