Adding DDoS preventing techniques

pull/702/head
Vijeta Hingorani 2022-09-05 10:35:47 -04:00
parent 7e8f93e57d
commit ebd9a6a771
1 changed files with 173 additions and 82 deletions

255
README.md
View File

@ -97,87 +97,178 @@ Review the [Contributing Guidelines](CONTRIBUTING.md).
<br/> <br/>
</p> </p>
* [System design topics: start here](#system-design-topics-start-here) - [The System Design Primer](#the-system-design-primer)
* [Step 1: Review the scalability video lecture](#step-1-review-the-scalability-video-lecture) - [Motivation](#motivation)
* [Step 2: Review the scalability article](#step-2-review-the-scalability-article) - [Learn how to design large-scale systems](#learn-how-to-design-large-scale-systems)
* [Next steps](#next-steps) - [Learn from the open source community](#learn-from-the-open-source-community)
* [Performance vs scalability](#performance-vs-scalability) - [Prep for the system design interview](#prep-for-the-system-design-interview)
* [Latency vs throughput](#latency-vs-throughput) - [Anki flashcards](#anki-flashcards)
* [Availability vs consistency](#availability-vs-consistency) - [Coding Resource: Interactive Coding Challenges](#coding-resource-interactive-coding-challenges)
* [CAP theorem](#cap-theorem) - [Contributing](#contributing)
* [CP - consistency and partition tolerance](#cp---consistency-and-partition-tolerance) - [Index of system design topics](#index-of-system-design-topics)
* [AP - availability and partition tolerance](#ap---availability-and-partition-tolerance) - [Study guide](#study-guide)
* [Consistency patterns](#consistency-patterns) - [How to approach a system design interview question](#how-to-approach-a-system-design-interview-question)
* [Weak consistency](#weak-consistency) - [Step 1: Outline use cases, constraints, and assumptions](#step-1-outline-use-cases-constraints-and-assumptions)
* [Eventual consistency](#eventual-consistency) - [Step 2: Create a high level design](#step-2-create-a-high-level-design)
* [Strong consistency](#strong-consistency) - [Step 3: Design core components](#step-3-design-core-components)
* [Availability patterns](#availability-patterns) - [Step 4: Scale the design](#step-4-scale-the-design)
* [Fail-over](#fail-over) - [Back-of-the-envelope calculations](#back-of-the-envelope-calculations)
* [Replication](#replication) - [Source(s) and further reading](#sources-and-further-reading)
* [Availability in numbers](#availability-in-numbers) - [System design interview questions with solutions](#system-design-interview-questions-with-solutions)
* [Domain name system](#domain-name-system) - [Design Pastebin.com (or Bit.ly)](#design-pastebincom-or-bitly)
* [Content delivery network](#content-delivery-network) - [Design the Twitter timeline and search (or Facebook feed and search)](#design-the-twitter-timeline-and-search-or-facebook-feed-and-search)
* [Push CDNs](#push-cdns) - [Design a web crawler](#design-a-web-crawler)
* [Pull CDNs](#pull-cdns) - [Design Mint.com](#design-mintcom)
* [Load balancer](#load-balancer) - [Design the data structures for a social network](#design-the-data-structures-for-a-social-network)
* [Active-passive](#active-passive) - [Design a key-value store for a search engine](#design-a-key-value-store-for-a-search-engine)
* [Active-active](#active-active) - [Design Amazon's sales ranking by category feature](#design-amazons-sales-ranking-by-category-feature)
* [Layer 4 load balancing](#layer-4-load-balancing) - [Design a system that scales to millions of users on AWS](#design-a-system-that-scales-to-millions-of-users-on-aws)
* [Layer 7 load balancing](#layer-7-load-balancing) - [Object-oriented design interview questions with solutions](#object-oriented-design-interview-questions-with-solutions)
* [Horizontal scaling](#horizontal-scaling) - [System design topics: start here](#system-design-topics-start-here)
* [Reverse proxy (web server)](#reverse-proxy-web-server) - [Step 1: Review the scalability video lecture](#step-1-review-the-scalability-video-lecture)
* [Load balancer vs reverse proxy](#load-balancer-vs-reverse-proxy) - [Step 2: Review the scalability article](#step-2-review-the-scalability-article)
* [Application layer](#application-layer) - [Next steps](#next-steps)
* [Microservices](#microservices) - [Performance vs scalability](#performance-vs-scalability)
* [Service discovery](#service-discovery) - [Source(s) and further reading](#sources-and-further-reading-1)
* [Database](#database) - [Latency vs throughput](#latency-vs-throughput)
* [Relational database management system (RDBMS)](#relational-database-management-system-rdbms) - [Source(s) and further reading](#sources-and-further-reading-2)
* [Master-slave replication](#master-slave-replication) - [Availability vs consistency](#availability-vs-consistency)
* [Master-master replication](#master-master-replication) - [CAP theorem](#cap-theorem)
* [Federation](#federation) - [CP - consistency and partition tolerance](#cp---consistency-and-partition-tolerance)
* [Sharding](#sharding) - [AP - availability and partition tolerance](#ap---availability-and-partition-tolerance)
* [Denormalization](#denormalization) - [Source(s) and further reading](#sources-and-further-reading-3)
* [SQL tuning](#sql-tuning) - [Consistency patterns](#consistency-patterns)
* [NoSQL](#nosql) - [Weak consistency](#weak-consistency)
* [Key-value store](#key-value-store) - [Eventual consistency](#eventual-consistency)
* [Document store](#document-store) - [Strong consistency](#strong-consistency)
* [Wide column store](#wide-column-store) - [Source(s) and further reading](#sources-and-further-reading-4)
* [Graph Database](#graph-database) - [Availability patterns](#availability-patterns)
* [SQL or NoSQL](#sql-or-nosql) - [Fail-over](#fail-over)
* [Cache](#cache) - [Active-passive](#active-passive)
* [Client caching](#client-caching) - [Active-active](#active-active)
* [CDN caching](#cdn-caching) - [Disadvantage(s): failover](#disadvantages-failover)
* [Web server caching](#web-server-caching) - [Replication](#replication)
* [Database caching](#database-caching) - [Master-slave and master-master](#master-slave-and-master-master)
* [Application caching](#application-caching) - [Availability in numbers](#availability-in-numbers)
* [Caching at the database query level](#caching-at-the-database-query-level) - [99.9% availability - three 9s](#999-availability---three-9s)
* [Caching at the object level](#caching-at-the-object-level) - [99.99% availability - four 9s](#9999-availability---four-9s)
* [When to update the cache](#when-to-update-the-cache) - [Availability in parallel vs in sequence](#availability-in-parallel-vs-in-sequence)
* [Cache-aside](#cache-aside) - [In sequence](#in-sequence)
* [Write-through](#write-through) - [In parallel](#in-parallel)
* [Write-behind (write-back)](#write-behind-write-back) - [Domain name system](#domain-name-system)
* [Refresh-ahead](#refresh-ahead) - [Disadvantage(s): DNS](#disadvantages-dns)
* [Asynchronism](#asynchronism) - [Source(s) and further reading](#sources-and-further-reading-5)
* [Message queues](#message-queues) - [Content delivery network](#content-delivery-network)
* [Task queues](#task-queues) - [Push CDNs](#push-cdns)
* [Back pressure](#back-pressure) - [Pull CDNs](#pull-cdns)
* [Communication](#communication) - [Disadvantage(s): CDN](#disadvantages-cdn)
* [Transmission control protocol (TCP)](#transmission-control-protocol-tcp) - [Source(s) and further reading](#sources-and-further-reading-6)
* [User datagram protocol (UDP)](#user-datagram-protocol-udp) - [Load balancer](#load-balancer)
* [Remote procedure call (RPC)](#remote-procedure-call-rpc) - [Layer 4 load balancing](#layer-4-load-balancing)
* [Representational state transfer (REST)](#representational-state-transfer-rest) - [Layer 7 load balancing](#layer-7-load-balancing)
* [Security](#security) - [Horizontal scaling](#horizontal-scaling)
* [Appendix](#appendix) - [Disadvantage(s): horizontal scaling](#disadvantages-horizontal-scaling)
* [Powers of two table](#powers-of-two-table) - [Disadvantage(s): load balancer](#disadvantages-load-balancer)
* [Latency numbers every programmer should know](#latency-numbers-every-programmer-should-know) - [Source(s) and further reading](#sources-and-further-reading-7)
* [Additional system design interview questions](#additional-system-design-interview-questions) - [Reverse proxy (web server)](#reverse-proxy-web-server)
* [Real world architectures](#real-world-architectures) - [Load balancer vs reverse proxy](#load-balancer-vs-reverse-proxy)
* [Company architectures](#company-architectures) - [Disadvantage(s): reverse proxy](#disadvantages-reverse-proxy)
* [Company engineering blogs](#company-engineering-blogs) - [Source(s) and further reading](#sources-and-further-reading-8)
* [Under development](#under-development) - [Application layer](#application-layer)
* [Credits](#credits) - [Microservices](#microservices)
* [Contact info](#contact-info) - [Service Discovery](#service-discovery)
* [License](#license) - [Disadvantage(s): application layer](#disadvantages-application-layer)
- [Source(s) and further reading](#sources-and-further-reading-9)
- [Database](#database)
- [Relational database management system (RDBMS)](#relational-database-management-system-rdbms)
- [Master-slave replication](#master-slave-replication)
- [Disadvantage(s): master-slave replication](#disadvantages-master-slave-replication)
- [Master-master replication](#master-master-replication)
- [Disadvantage(s): master-master replication](#disadvantages-master-master-replication)
- [Disadvantage(s): replication](#disadvantages-replication)
- [Source(s) and further reading: replication](#sources-and-further-reading-replication)
- [Federation](#federation)
- [Disadvantage(s): federation](#disadvantages-federation)
- [Source(s) and further reading: federation](#sources-and-further-reading-federation)
- [Sharding](#sharding)
- [Disadvantage(s): sharding](#disadvantages-sharding)
- [Source(s) and further reading: sharding](#sources-and-further-reading-sharding)
- [Denormalization](#denormalization)
- [Disadvantage(s): denormalization](#disadvantages-denormalization)
- [Source(s) and further reading: denormalization](#sources-and-further-reading-denormalization)
- [SQL tuning](#sql-tuning)
- [Tighten up the schema](#tighten-up-the-schema)
- [Use good indices](#use-good-indices)
- [Avoid expensive joins](#avoid-expensive-joins)
- [Partition tables](#partition-tables)
- [Tune the query cache](#tune-the-query-cache)
- [Source(s) and further reading: SQL tuning](#sources-and-further-reading-sql-tuning)
- [NoSQL](#nosql)
- [Key-value store](#key-value-store)
- [Source(s) and further reading: key-value store](#sources-and-further-reading-key-value-store)
- [Document store](#document-store)
- [Source(s) and further reading: document store](#sources-and-further-reading-document-store)
- [Wide column store](#wide-column-store)
- [Source(s) and further reading: wide column store](#sources-and-further-reading-wide-column-store)
- [Graph database](#graph-database)
- [Source(s) and further reading: graph](#sources-and-further-reading-graph)
- [Source(s) and further reading: NoSQL](#sources-and-further-reading-nosql)
- [SQL or NoSQL](#sql-or-nosql)
- [Source(s) and further reading: SQL or NoSQL](#sources-and-further-reading-sql-or-nosql)
- [Cache](#cache)
- [Client caching](#client-caching)
- [CDN caching](#cdn-caching)
- [Web server caching](#web-server-caching)
- [Database caching](#database-caching)
- [Application caching](#application-caching)
- [Caching at the database query level](#caching-at-the-database-query-level)
- [Caching at the object level](#caching-at-the-object-level)
- [When to update the cache](#when-to-update-the-cache)
- [Cache-aside](#cache-aside)
- [Disadvantage(s): cache-aside](#disadvantages-cache-aside)
- [Write-through](#write-through)
- [Disadvantage(s): write through](#disadvantages-write-through)
- [Write-behind (write-back)](#write-behind-write-back)
- [Disadvantage(s): write-behind](#disadvantages-write-behind)
- [Refresh-ahead](#refresh-ahead)
- [Disadvantage(s): refresh-ahead](#disadvantages-refresh-ahead)
- [Disadvantage(s): cache](#disadvantages-cache)
- [Source(s) and further reading](#sources-and-further-reading-10)
- [Asynchronism](#asynchronism)
- [Message queues](#message-queues)
- [Task queues](#task-queues)
- [Back pressure](#back-pressure)
- [Disadvantage(s): asynchronism](#disadvantages-asynchronism)
- [Source(s) and further reading](#sources-and-further-reading-11)
- [Communication](#communication)
- [Hypertext transfer protocol (HTTP)](#hypertext-transfer-protocol-http)
- [Source(s) and further reading: HTTP](#sources-and-further-reading-http)
- [Transmission control protocol (TCP)](#transmission-control-protocol-tcp)
- [User datagram protocol (UDP)](#user-datagram-protocol-udp)
- [Source(s) and further reading: TCP and UDP](#sources-and-further-reading-tcp-and-udp)
- [Remote procedure call (RPC)](#remote-procedure-call-rpc)
- [Disadvantage(s): RPC](#disadvantages-rpc)
- [Representational state transfer (REST)](#representational-state-transfer-rest)
- [Disadvantage(s): REST](#disadvantages-rest)
- [RPC and REST calls comparison](#rpc-and-rest-calls-comparison)
- [Source(s) and further reading: REST and RPC](#sources-and-further-reading-rest-and-rpc)
- [Security](#security)
- [Source(s) and further reading](#sources-and-further-reading-12)
- [Appendix](#appendix)
- [Powers of two table](#powers-of-two-table)
- [Source(s) and further reading](#sources-and-further-reading-13)
- [Latency numbers every programmer should know](#latency-numbers-every-programmer-should-know)
- [Latency numbers visualized](#latency-numbers-visualized)
- [Source(s) and further reading](#sources-and-further-reading-14)
- [Additional system design interview questions](#additional-system-design-interview-questions)
- [Real world architectures](#real-world-architectures)
- [Company architectures](#company-architectures)
- [Company engineering blogs](#company-engineering-blogs)
- [Source(s) and further reading](#sources-and-further-reading-15)
- [Under development](#under-development)
- [Credits](#credits)
- [Contact info](#contact-info)
- [License](#license)
## Study guide ## Study guide
@ -608,7 +699,7 @@ Services such as [CloudFlare](https://www.cloudflare.com/dns/) and [Route 53](ht
* Accessing a DNS server introduces a slight delay, although mitigated by caching described above. * Accessing a DNS server introduces a slight delay, although mitigated by caching described above.
* DNS server management could be complex and is generally managed by [governments, ISPs, and large companies](http://superuser.com/questions/472695/who-controls-the-dns-servers/472729). * DNS server management could be complex and is generally managed by [governments, ISPs, and large companies](http://superuser.com/questions/472695/who-controls-the-dns-servers/472729).
* DNS services have recently come under [DDoS attack](http://dyn.com/blog/dyn-analysis-summary-of-friday-october-21-attack/), preventing users from accessing websites such as Twitter without knowing Twitter's IP address(es). * DNS services have recently come under [DDoS attack](http://dyn.com/blog/dyn-analysis-summary-of-friday-october-21-attack/), preventing users from accessing websites such as Twitter without knowing Twitter's IP address(es). Common techniques to prevent DDoS are implementing Rate limiting and Firewall.
### Source(s) and further reading ### Source(s) and further reading