Show Menu
Cheatography

C# Azure DevOps Tech Interview Cheat Sheet (DRAFT) by

Azure Devops Backend

This is a draft cheat sheet. It is a work in progress and is not finished yet.

DevOps Basics

DevOps is a mixture of develo­pment and ops, sometimes including CI/CD, Agile planning, and monitoring applic­ations.
Used because of it's easy delivery of software and for benefits of reliab­ility, security, and stability.
DevOps also help deliver small results in frequent loops so that major projects can be completed in minor chunks increasing produc­tivity.
Azure DevOps Services:
Azure Boards
Azure Pipelines
Azure Repos
Azure Artifacts
Azure Test Plans}

Cloud Deployment Models

Public Cloud
The infras­tru­cture is owned by your cloud provider and the server that you are using could be a multi-­tenant system.
Private Cloud
The infras­tru­cture is owned by you or your cloud provider gives you that service exclus­ively. Example: Hosting your website on your servers, or hosting your website with the cloud provider on a dedicated server.
Hybrid Cloud
When you use both Public Cloud, Private Cloud together, it is called Hybrid Cloud. For Example: Using your in-house servers for confid­ential data, and the public cloud for hosting your company’s public facing website. This type of setup would be a hybrid cloud.

Service Types Comparison

 
Advantages
Disadv­atages
Public
+ High Scalab­ili­ty/­Agility
+ PAYG (No CapEx, OpEx model)
+ Not respon­sible for hardware mainte­nance
+ Minimal technical knowledge required
- May not be able to meet specific security requir­ements
- May not be able to meet specific compliance requir­ements
- You don't own the hardware and may not be able to manage them as you wish
Private
+ You have complete control
+ Can meet strict security and compliance requir­ements
- Upfront CapEx costs
- Owning equipment limits agility to scale
- Requires high technical knowledge
Hybrid
+ Advantages of both Public and Private
- Can be more expensive than selecting one deployment model
- Can be more compli­cated to set up and manage

Azure Networking Services

Virtual Network
Connects VMs to incoming Virtual Private Network (VPN) connec­tions
Load Balancer
Balances inbound and outbound connec­tions to applic­ations or service endpoint
VPN Gateway
Accesses Azure Virtual Networks through high-p­erf­ormance VPN gateways
Applic­ation Gateway
Optimizes app server farm delivery while increasing applic­ation security
Content Delivery Network
Delivers high-b­and­width content to customers globally

Azure Databases

CosmosDB
Globally distri­buted database that supports NoSQL options
Azure SQL Database
Fully managed relational database with auto-s­cale, integral intell­igence, and robust security
Azure Database Migration Service
Migrates your databases to the cloud with no applic­ation code changes
Azure SQL Data Warehouse
Fully managed data warehouse with integral security at every level of scale at no extra cost

Web Archit­ecture Best Practices

System flexib­ility
Component reusab­ility
Clarity and well-t­hought structure of your code
Scalab­ility
Stability and reliab­ility
Easy bug-de­tection
Perfor­mance level regarding your system as a whole

MVC Archit­ecture

Optimize SQL Stored Procedure

Use SET NOCOUNT ON - Suppresses network messages and decreases traffic
Use fully qualified procedure name - A fully qualified object name is databa­se.s­ch­ema.ob­jec­tname
Using IF EXISTS AND SELECT 1 - If checking the existing record, don't need to return column names
Keep transa­ction short and crisp - The longer the transa­ction the longer the locks will be held based on isolation level. This may result in deadlocks and blocking.
 

Azure Pipelines

Tasks
Get resources, Restore, Build, Test, Publish Artifacts
Triggers
Enable CI, Add branches
Variables
Add enviro­nment variables or groups

Service Types

IAAS
PAAS
SAAS
Infras­tru­cture as a Service
Platform as a Service
Software as a Service
Raw hardware that can be config­ured.
Platform to publish without giving access to software or OS
Software to use without purchase.
Example: Azure VM
Example: Web Apps
Example: Dropbox

Pizza as a Service

Azure Storage Services

Blob Storage
Storage service for very large objects, such as video files or bitmaps
Disk Storage
Provides disks for virtual machines, applic­ations, and other services.
File Storage
Azure Files offers fully-­managed file shares in the cloud.
Archive Stroage
Storage facility for data that is rarely accessed.

Azure Compute Services

Virtual Machines
Emulate physical computers. Include virtual processor, memory, storage and networking resources. VMs host and OS and can be logged into through remote client
VM Scale Sets
Can use to deploy and manage a set of identical VMs. With all VMs configured the same, virtual machine scale sets are designed to support true autoscale. As demand goes up, more VM instances can be added. As demand goes down, VM instances can be removed. The process can be manual, automated, or a combin­ation of both.
Contai­ner­s/K­ube­rnetes
Can use to deploy and manage contai­ners. Containers are lightw­eight, virtua­lized applic­ation enviro­nments. They're designed to be quickly created, scaled out, and stopped dynami­cally. You can run multiple instances of a contai­nerized applic­ation on a single host machine.
App Service
Quickly build, deploy, and scale enterp­ris­e-grade web, mobile, and API apps running on any platform. You can meet rigorous perfor­mance, scalab­ility, security, and compliance requir­ements while using a fully managed platform to perform infras­tru­cture mainte­nance. App Service is a platform as a service (PaaS) offering.
Functions
Functions are ideal when you're concerned only about the code running your service and not the underlying platform or infras­tru­cture. They're commonly used when you need to perform work in response to an event (often via a REST request), timer, or message from another Azure service, and when that work can be completed quickly, within seconds or less.

User Session Management

Set secure­/Ht­tpOnly flags on your cookies. Avoid sending delicate traffic and tokens across an unencr­ypted channel.
Generate new session cookies. All new session tokens should be generated at every session as soon as a consumer visits the applic­ation, verifies the correct creden­tials, and logs out of their account. A cookie should expire if the account is inactive for an extended period of time, and you should bind the consumer to re-aut­hen­ticate.
Configure session cookies properly. Session tokens should be extended, random, and uncommon. These properties can ensure that an attacker cannot guess or brute force the session token's value.

Caching

Caching is a common technique that aims to improve the perfor­mance and scalab­ility of a system. It does this by tempor­arily copying frequently accessed data to fast storage that's located close to the applic­ation.
Distri­buted applic­ations typically implement either or both of the following strategies when caching data:
Using a private cache, where data is held locally on the computer that's running an instance of an applic­ation or service.
Using a shared cache, serving as a common source that can be accessed by multiple processes and machines.
The key to using a cache effect­ively lies in determ­ining the most approp­riate data to cache, and caching it at the approp­riate time.
Caching typically works well with data that is immutable or that changes infreq­uently. Examples include reference inform­ation such as product and pricing inform­ation in an e-commerce applic­ation, or shared static resources that are costly to construct.
Caching is typically less useful for dynamic data.