💻
Programming Hard

Advanced Web and System Design

Microservices, databases, caching, security and system architecture!

20 Questions
35s Per Question
0+ Plays
← All Programming Quizzes 📚 Study Guide for this category →
💡 Create account to save scores & earn XP
📋 View All 20 Questions & Answers

1. What is "rate limiting" in APIs?

  • A. Speeding up API responses
  • B. Limiting the number of requests a client can make in a given time period ✓
  • C. Caching API responses
  • D. Encrypting API data

💡 Rate limiting controls how many requests a client can make in a time window to prevent abuse and ensure fair usage.

2. What is "sharding" in databases?

  • A. Encrypting a database
  • B. Backing up a database
  • C. Partitioning data across multiple databases to distribute load ✓
  • D. Indexing a database

💡 Sharding horizontally partitions data across multiple database instances (shards), each holding a subset of the data.

3. What is "CORS" in web development?

  • A. A type of database query
  • B. A CSS framework
  • C. Cross-Origin Resource Sharing — controls how browsers allow cross-domain requests ✓
  • D. A caching mechanism

💡 CORS is a browser security mechanism that controls which domains can make requests to a server from a different origin.

4. What is "load balancing"?

  • A. Balancing CPU and memory
  • B. Distributing incoming network traffic across multiple servers ✓
  • C. A type of caching
  • D. A database technique

💡 Load balancing distributes incoming requests across multiple servers to ensure no single server is overwhelmed.

5. What is a "microservices" architecture?

  • A. A single large application
  • B. A monolithic approach
  • C. An approach where an app is built as a collection of small independent services ✓
  • D. A type of database design

💡 Microservices break applications into small, independently deployable services that communicate via APIs.

6. What is "OAuth 2.0"?

  • A. A type of database
  • B. A CSS framework
  • C. An encryption standard
  • D. An authorization framework allowing third-party apps limited access to user accounts ✓

💡 OAuth 2.0 lets users grant third-party applications access to their resources without sharing credentials (e.g., Sign in with Google).

7. What is "SQL injection"?

  • A. A database backup technique
  • B. A type of database optimization
  • C. An attack where malicious SQL code is inserted into a query ✓
  • D. A way to speed up SQL queries

💡 SQL injection inserts malicious SQL into input fields to manipulate database queries, potentially exposing or destroying data.

8. What is a CDN (Content Delivery Network)?

  • A. A type of database
  • B. A geographically distributed network of servers that delivers content to users from the nearest location ✓
  • C. A programming framework
  • D. A type of API

💡 A CDN caches content at edge servers worldwide, reducing latency by serving users from the geographically closest server.

9. What is the purpose of "indexing" in databases?

  • A. To store data
  • B. To back up data
  • C. To improve the speed of data retrieval operations ✓
  • D. To encrypt data

💡 Database indexes create data structures that allow faster searching of records, trading storage space for query speed.

10. What is "horizontal scaling"?

  • A. Making a single server more powerful
  • B. Adding more servers to distribute load ✓
  • C. Increasing RAM of a server
  • D. Upgrading CPU

💡 Horizontal scaling (scaling out) adds more servers to handle increased load, distributing traffic across multiple machines.

11. What is "GraphQL"?

  • A. A graph database
  • B. A CSS framework
  • C. A type of NoSQL database
  • D. A query language for APIs allowing clients to request exactly the data they need ✓

💡 GraphQL is an API query language where clients specify exactly what data they need, reducing over-fetching and under-fetching.

12. What is the CAP theorem in distributed systems?

  • A. CPU, API, Protocol theorem
  • B. A system can guarantee only two of: Consistency, Availability, Partition tolerance ✓
  • C. Caching, Access, Performance
  • D. Consistency, Authentication, Privacy

💡 CAP theorem states a distributed system can only guarantee two of three: Consistency, Availability, and Partition Tolerance.

13. What is "eventual consistency" in distributed systems?

  • A. Data is always consistent
  • B. All nodes will become consistent given enough time with no new updates ✓
  • C. Data is never consistent
  • D. Consistency happens instantly

💡 Eventual consistency guarantees that if no new updates are made, all replicas will eventually return the same value.

14. What is "HTTPS" and how does it differ from HTTP?

  • A. No difference
  • B. HTTPS is faster
  • C. HTTPS is HTTP with SSL/TLS encryption for secure data transmission ✓
  • D. HTTPS only works on mobile

💡 HTTPS encrypts data between the browser and server using SSL/TLS, protecting against eavesdropping and man-in-the-middle attacks.

15. What is "JWT" in web security?

  • A. Java Web Tool
  • B. A type of cookie
  • C. JSON Web Token — a compact, self-contained token for securely transmitting information ✓
  • D. JavaScript Web Transfer

💡 JWT (JSON Web Token) is used for stateless authentication, encoding user claims in a signed token sent with each request.

16. What is "Docker" used for?

  • A. A programming language
  • B. A database system
  • C. A version control system
  • D. Containerizing applications to run consistently across environments ✓

💡 Docker packages applications and dependencies into containers that run consistently across different environments and systems.

17. What is the difference between SQL and NoSQL databases?

  • A. No difference
  • B. NoSQL is faster always
  • C. SQL uses structured tables with relations; NoSQL uses flexible document, key-value, or graph models ✓
  • D. SQL is newer than NoSQL

💡 SQL databases use structured tables with fixed schemas. NoSQL databases offer flexible schemas in document, key-value, graph, or column formats.

18. What is "Redis" primarily used for?

  • A. A relational database
  • B. A frontend framework
  • C. An in-memory data structure store used as cache or message broker ✓
  • D. A version control system

💡 Redis is an in-memory key-value store used for caching, session management, real-time analytics, and pub/sub messaging.

19. What is "message queue" in system design?

  • A. A type of database
  • B. A list of pending HTTP requests
  • C. A communication method where messages are stored and processed asynchronously ✓
  • D. A type of load balancer

💡 Message queues (like RabbitMQ, Kafka) store messages between services so they can be processed asynchronously, decoupling producers and consumers.

20. What is the difference between authentication and authorization?

  • A. They are the same
  • B. Authentication is verifying who you are; authorization is verifying what you can access ✓
  • C. Authorization comes before authentication
  • D. Authentication is for APIs only

💡 Authentication verifies identity (who you are). Authorization verifies permissions (what you are allowed to do).

More Programming Quizzes

View all Programming quizzes →