REST is an architectural style using resources, HTTP methods, and stateless communication. It is not a query language, CSS framework, or JS library.
题目 2
What does HTTP status 200 mean?
HTTP 200 indicates a successful request. 404 means not found, 500 is a server error, and 3xx codes are redirects.
题目 3
What does HTTP status 404 mean?
404 means the requested resource could not be found. 200 is success, 401 is unauthorized, and 201 is created.
题目 4
What does HTTP status 500 mean?
500 indicates an internal server error on the server side. 200 is success, 400 is a bad request, and 404 is not found.
题目 5
What is a GET request used for?
GET retrieves data and should not change server state. POST creates, PUT updates, and DELETE removes resources.
题目 6
What is a POST request used for?
POST is used to create resources or submit data. GET reads, PUT updates, and DELETE removes resources.
题目 7
What is idempotency?
An idempotent operation can be repeated safely with the same effect. GET, PUT, and DELETE are typically idempotent, while POST is not guaranteed.
题目 8
What is an API endpoint?
An endpoint is a URL such as /users that identifies an operation on a resource. It is not a table, log, or class.
题目 9
What is JSON?
JSON is a text format for representing structured data, commonly used in APIs. It is not a database, server, or preprocessor.
题目 10
What is API versioning?
Versioning lets APIs evolve without breaking existing clients, often through URL paths or headers. It is not caching, encryption, or log rotation.
题目 11
What is rate limiting?
Rate limiting controls request frequency per client to protect services. It is not query tuning, response sizing, or memory capping.
题目 12
What is a webhook?
A webhook is an HTTP callback sent by a server when an event occurs. It is not a plugin, animation, or database trigger.
题目 13
What is a database index?
An index organizes column values to speed up lookups and filtering. It is not a backup, foreign key, or transaction log, and it can slow writes.
题目 14
What is normalization?
Normalization structures tables to reduce duplication and dependency problems. It is not encryption, sharding, or compression.
题目 15
What is a foreign key?
A foreign key links rows to a primary key in another table, enforcing relationships. A primary key identifies rows in the same table.
题目 16
What is a transaction?
A transaction groups operations with atomicity so they commit or roll back together. It is not a single query, backup, or index.
题目 17
What does ACID stand for?
ACID guarantees atomicity, consistency, isolation, and durability for database transactions. The other sets are not the standard ACID definition.
题目 18
What is a NoSQL database?
NoSQL databases use non-relational models such as documents, key-values, or graphs, often for flexible schemas and scale. They still have security and can scale.
题目 19
Which database is document-based?
MongoDB stores documents in BSON. Redis is a key-value store, while PostgreSQL and MySQL are relational databases.
题目 20
Which database is a key-value store?
Redis is an in-memory key-value store often used for caching. MongoDB is document-based, PostgreSQL is relational, and Cassandra is a wide-column store.
题目 21
What is sharding?
Sharding partitions data horizontally across servers to distribute load. It is not encryption, backup, or normalization.
题目 22
What is replication?
Replication copies data to replica nodes for read scaling and failover. It is not deduplication, indexing, or compression.
题目 23
What is a connection pool?
A connection pool reuses database connections to reduce setup overhead. It is not a query cache, backup, or firewall.
题目 24
What is an ORM?
An ORM maps application objects to database tables and rows. It is not object storage, a queue, or a load balancer.
题目 25
What is a database migration?
Migrations manage schema changes with versioned scripts. They are not region copies, log deletion, or restarts.
题目 26
What is a query plan?
A query plan shows how the database will execute a query, including index usage and joins. It is not a backup, style guide, or API design.
题目 27
What is caching?
Caching stores copies of data closer to the caller to reduce latency and load. It is not encryption, backup, or normalization.
题目 28
What is cache invalidation?
Cache invalidation keeps cached data consistent by removing or refreshing entries when the source changes. It is not deletion of servers, encryption, or scaling.
题目 29
What is a cache-aside pattern?
Cache-aside reads from cache first; on a miss, it loads from the database and populates the cache. Write-through writes to cache and database together.
题目 30
What is a CDN?
A CDN caches content at edge locations near users to reduce latency. It is not a database, gateway, or broker.
题目 31
What is a message queue?
A message queue lets producers and consumers communicate asynchronously. It is not a table, balancer, or cache.
题目 32
What is publish/subscribe?
Pub/sub decouples publishers from subscribers through topics or channels. It is not replication, DNS, or caching.
题目 33
What is a dead letter queue?
A dead letter queue holds messages that repeatedly fail so they can be inspected later. It is not a general queue or delivery failure state.
题目 34
What is authentication?
Authentication verifies identity, while authorization determines permissions. Encryption and logging are separate concerns.
题目 35
What is authorization?
Authorization decides whether an authenticated user can access a resource. Authentication verifies identity first.
题目 36
What is hashing used for in security?
Hashing transforms passwords into irreversible digests, often with salts. It is not encryption, compression, or routing.
题目 37
What is a JWT?
A JSON Web Token is a signed token containing claims used for authentication and authorization. It is not a framework, index, or cache key.
题目 38
What is TLS?
TLS encrypts data in transit over HTTPS. It is not a balancer, database, or log format.
题目 39
What is CSRF?
Cross-site request forgery tricks a logged-in user into sending unwanted requests. Tokens and same-site cookies help prevent it.
题目 40
What is horizontal scaling?
Horizontal scaling adds more machines, while vertical scaling increases resources on one machine. Disk and compression are different.
题目 41
What is vertical scaling?
Vertical scaling increases CPU, memory, or disk on one server. Horizontal scaling adds more servers.
题目 42
What does a load balancer do?
A load balancer spreads incoming requests across healthy servers to improve availability and utilization. It is not encryption, cache, or jobs.
题目 43
What is a reverse proxy?
A reverse proxy sits in front of backend servers, handling SSL, routing, and load balancing. It is not a replica, database, or DNS.
题目 44
What is statelessness?
Stateless servers do not keep client state between requests, making horizontal scaling easier. Sessions and caches are stateful by nature.
题目 45
What is a microservice?
Microservices are small services with clear boundaries that deploy independently. A monolith is a single application.
题目 46
What is a monolith?
A monolith packages all features into one application. Microservices split features into separate services.
题目 47
What is availability?
Availability measures uptime, such as 99.9%. Latency measures speed, and users or data size are separate metrics.
题目 48
What is latency?
Latency is the time from request to response. Throughput is requests per second, error rate is failures, and memory is resource usage.
题目 49
What is throughput?
Throughput measures capacity such as requests per second. Latency is per-request time, uptime is availability, and hit rate is cache performance.
题目 50
What is a circuit breaker?
A circuit breaker opens when a service fails, preventing cascading failures. It is not a lock, switch, or cache.
题目 51
What is graceful degradation?
Graceful degradation serves reduced functionality during failures instead of failing completely. It is not shutdown, restart, or redirect.
题目 52
What is an API gateway?
An API gateway centralizes routing, auth, rate limiting, and logging for APIs. It is not a pool, broker, or framework.
题目 53
What is eventual consistency?
Eventual consistency means replicas may be briefly different but converge over time. Strong consistency guarantees immediate agreement.
题目 54
What is pagination?
Pagination limits and pages through result sets, often with offset or cursor parameters. It is not encryption, caching, or compression.
题目 55
What is a background job?
Background jobs process work asynchronously, such as emails or image resizing, to keep requests fast. They are not synchronous calls or queries.
题目 56
What is observability?
Observability uses logs, metrics, and traces to understand and debug systems. It is not a firewall, cache, or balancer.
题目 57
Which of the following are HTTP methods? Select all that apply.
GET, POST, and PUT are HTTP methods. FETCH is a browser API, not an HTTP method.
题目 58
Which of the following are database types? Select all that apply.
Relational, document, key-value, and graph are all database models. They support different data shapes and workloads.
题目 59
POST requests are guaranteed to be idempotent.
POST is not guaranteed to be idempotent because repeating it can create multiple resources. PUT and DELETE are typically idempotent.
题目 60
Match each HTTP status code to its meaning.
200 means OK, 404 means not found, 500 is an internal server error, and 429 means too many requests.