🐍 PYTHON


Core Language

Q: What are Python’s key features? Interpreted, dynamically typed, garbage-collected, supports OOP/functional/procedural paradigms, extensive standard library, indentation-enforced syntax.


Q: What is the GIL? Why does it matter? Global Interpreter Lock — a mutex that allows only one thread to execute Python bytecode at a time. Prevents true parallelism with threads. Use multiprocessing for CPU-bound tasks; asyncio/threads are fine for I/O-bound.


Q: Mutable vs Immutable types?

  • Mutable: list, dict, set — can change after creation.
  • Immutable: int, float, str, tuple, frozenset — cannot. Using a mutable default argument in a function is a classic bug — use None and assign inside.

Q: What are *args and **kwargs?

  • *args — captures extra positional args as a tuple.
  • **kwargs — captures extra keyword args as a dict.

Q: List vs Tuple vs Set vs Dict?

TypeOrderedMutableDuplicatesLookup
listO(n)
tupleO(n)
setO(1)
dict✅ (3.7+)keys: ❌O(1)

Q: What is a list comprehension? What about dict/set comprehensions? Concise way to create collections.

squares = [x**2 for x in range(10) if x % 2 == 0]
sq_dict = {x: x**2 for x in range(5)}
sq_set  = {x**2 for x in range(5)}

Q: What are generators? Why use them? Functions using yield that produce values lazily — one at a time. Memory-efficient for large sequences. next() advances them; exhausted after one pass.

def count_up(n):
    for i in range(n):
        yield i

Q: What are decorators? Functions that wrap another function to extend its behavior without modifying it. Use @ syntax.

def my_decorator(func):
    def wrapper(*args, **kwargs):
        print("before")
        result = func(*args, **kwargs)
        print("after")
        return result
    return wrapper

Q: What is __init__ vs __new__?

  • __new__ — creates the instance (class method, rarely overridden).
  • __init__ — initializes the already-created instance.

Q: Explain @staticmethod vs @classmethod vs instance method.

  • instance method — receives self; accesses instance and class state.
  • @classmethod — receives cls; used for factory methods or class-level state.
  • @staticmethod — receives neither; just a utility function namespaced in the class.

Q: What is inheritance? What is MRO? A class can inherit attributes/methods from a parent. Python uses C3 linearization for Method Resolution Order (__mro__), determining which parent’s method is called first in multiple inheritance.


Q: What are @property and setters? Allow method access like attribute access, with optional validation on set.

@property
def name(self): return self._name
@name.setter
def name(self, v): self._name = v.strip()

Q: What is __str__ vs __repr__?

  • __str__ — human-readable string (str(obj), print(obj)).
  • __repr__ — unambiguous developer string, ideally eval-able. Fallback if __str__ missing.

Q: What are context managers? How do you make one? Manage setup/teardown with with. Implement __enter__ and __exit__, or use @contextmanager.

with open("file.txt") as f:
    data = f.read()

Q: What is the difference between is and ==?

  • == checks value equality.
  • is checks identity (same object in memory). a = [1]; b = [1]; a == b → True, a is b → False.

Q: What are lambda functions? Anonymous, single-expression functions. lambda x, y: x + y. Use for short callbacks/sort keys; avoid for complex logic.


Q: What is map(), filter(), reduce()?

  • map(fn, iterable) — apply fn to each element.
  • filter(fn, iterable) — keep elements where fn returns True.
  • reduce(fn, iterable) — fold iterable to single value (from functools). List comprehensions are usually preferred over map/filter.

Q: Shallow copy vs Deep copy?

  • Shallow (copy.copy()) — new object, but nested objects are still references.
  • Deep (copy.deepcopy()) — fully independent clone of everything.

Q: What is __slots__? Declares a fixed set of attributes, preventing __dict__ creation. Reduces memory for classes with many instances.


Q: What are Python’s exception handling keywords? try / except / else / finally.

  • else runs if no exception was raised.
  • finally always runs (cleanup).

Q: What is the with statement used for? Resource management — guarantees cleanup even if an exception occurs. Works with any context manager.


Q: What is enumerate() and zip()?

  • enumerate(iterable) — yields (index, value) pairs.
  • zip(a, b) — pairs elements from multiple iterables, stops at shortest.

Q: What is defaultdict and Counter? From collections:

  • defaultdict(int) — returns a default value for missing keys instead of raising KeyError.
  • Counter(iterable) — counts hashable elements, returns dict-like with counts.

Q: What is the difference between append() and extend()?

  • append(x) — adds x as a single element.
  • extend(iterable) — adds all elements of iterable individually.

Q: What is None? Python’s null value. Singleton of NoneType. Check with is None, not == None.


Q: What is a closure? A function that remembers variables from its enclosing scope even after that scope has exited.

def outer(x):
    def inner(): return x  # x is "closed over"
    return inner

Q: What is global and nonlocal?

  • global x — tells Python that x in this function refers to the module-level variable.
  • nonlocal x — refers to the nearest enclosing (non-global) scope variable.

OOP

Q: Four pillars of OOP?

  1. Encapsulation — hide internal state, expose interface.
  2. Abstraction — expose only what’s necessary.
  3. Inheritance — child class reuses parent’s behavior.
  4. Polymorphism — same interface, different implementations.

Q: What is duck typing? “If it walks like a duck and quacks like a duck, it’s a duck.” Python doesn’t check types; it checks whether an object has the needed method/attribute. Enables flexible, interface-driven code.


Q: Abstract classes in Python? Use abc.ABC and @abstractmethod. Subclasses must implement abstract methods or they cannot be instantiated.


Memory & Performance

Q: How does Python manage memory? Reference counting + cyclic garbage collector. When ref count hits 0, memory is freed. gc module handles cyclic references.


Q: What are common ways to optimize Python performance? Use built-ins, list comprehensions over loops, numpy for numerics, generators for large data, lru_cache for memoization, profiling with cProfile.



🟩 DJANGO


Fundamentals

Q: What is Django? What is its design philosophy? High-level Python web framework. Follows MTV (Model-Template-View). Philosophy: DRY (Don’t Repeat Yourself), batteries-included, convention over configuration.


Q: MTV vs MVC?

DjangoMVC equivalent
ModelModel
TemplateView
ViewController

In Django, the “View” is the business logic layer (not the display layer).


Q: What is the Django request/response lifecycle?

  1. Browser sends HTTP request.
  2. urls.py routes to a View.
  3. View queries Model, processes data.
  4. Template renders HTML.
  5. View returns HttpResponse.

Q: What is manage.py? CLI tool for Django admin tasks: runserver, migrate, makemigrations, createsuperuser, shell, collectstatic, etc.


Q: What is settings.py? Central configuration: INSTALLED_APPS, DATABASES, MIDDLEWARE, STATIC_URL, SECRET_KEY, DEBUG, ALLOWED_HOSTS, etc.


Models & ORM

Q: What is Django ORM? Object-Relational Mapper — lets you interact with the database using Python objects instead of raw SQL. Each Model class maps to a DB table.


Q: What are model fields? CharField, IntegerField, BooleanField, DateTimeField, TextField, ForeignKey, ManyToManyField, OneToOneField, EmailField, URLField, FileField, ImageField, DecimalField, UUIDField.


Q: What are ForeignKey, OneToOneField, ManyToManyField?

  • ForeignKey — many-to-one (many orders → one customer).
  • OneToOneField — one-to-one (user → profile).
  • ManyToManyField — many-to-many (books ↔ authors).

Q: What is on_delete? Required param for FK/OneToOne. Defines what happens to child when parent is deleted.

  • CASCADE — delete children too.
  • SET_NULL — set FK to null.
  • PROTECT — prevent deletion.
  • SET_DEFAULT — set to default.

Q: What are migrations? Version-controlled DB schema changes. makemigrations generates migration files from model changes; migrate applies them to the DB.


Q: What is select_related vs prefetch_related? Both reduce N+1 query problems.

  • select_related — SQL JOIN, for FK/OneToOne (single query).
  • prefetch_related — separate query + Python join, for ManyToMany/reverse FK.

Q: What is the N+1 query problem? Fetching N objects then making 1 extra query per object for related data = N+1 queries total. Fix with select_related / prefetch_related.


Q: What is Meta class in a model? Inner class for model-level options: ordering, verbose_name, unique_together, indexes, db_table, abstract, permissions.


Q: What is QuerySet? Is it lazy? Represents a DB query that hasn’t necessarily run yet. Yes, lazy — evaluated only when iterated, sliced, or converted. Supports chaining: .filter().exclude().order_by().


Q: Common QuerySet methods? .all(), .filter(), .exclude(), .get(), .create(), .update(), .delete(), .count(), .exists(), .first(), .last(), .values(), .values_list(), .annotate(), .aggregate(), .order_by(), .distinct().


Q: Difference between .get() and .filter()?

  • .get() — returns single object; raises DoesNotExist or MultipleObjectsReturned.
  • .filter() — returns a QuerySet (empty if nothing matches).

Q: What is F() expression? References a model field value in the DB without fetching it to Python. Useful for atomic updates: Product.objects.update(price=F('price') * 1.1).


Q: What is Q() object? Enables complex queries with | (OR) and & (AND): Post.objects.filter(Q(title='x') | Q(body__contains='y')).


Q: What is annotate() vs aggregate()?

  • annotate() — adds a computed field to each object in QuerySet.
  • aggregate() — computes a single value over the entire QuerySet.

Q: What is abstract = True in Meta? Makes the model abstract — no DB table is created. Used as a base class to share fields/methods across models.


Views

Q: Function-Based Views (FBV) vs Class-Based Views (CBV)?

  • FBV — simple, explicit, def my_view(request): …. Good for one-off logic.
  • CBVclass MyView(View): …, better for reuse via mixins, generic views. More structured but verbose.

Q: What are Generic Class-Based Views? Built-in views for common patterns:

  • ListView, DetailView, CreateView, UpdateView, DeleteView, TemplateView, RedirectView.

Q: What is HttpRequest and HttpResponse?

  • HttpRequest — Django’s object for incoming requests; has .method, .GET, .POST, .user, .headers, .body.
  • HttpResponse — what views return; contains status code, headers, content.

Q: What is redirect() and render()?

  • render(request, 'template.html', context) — renders a template to HttpResponse.
  • redirect('url') — returns an HttpResponseRedirect.

Q: What is get_object_or_404()? Fetches an object or returns a 404 response. Cleaner than manual try/except.


URLs

Q: How does URL routing work in Django? urls.py maps URL patterns to views using path() or re_path(). Project-level urls.py includes app-level ones with include().


Q: What are URL namespaces? app_name = 'blog' in urls.py, then reference as {% url 'blog:post_detail' pk=1 %}. Prevents name collisions between apps.


Templates

Q: What is the Django template language? Built-in templating with {{ variable }}, {% tag %}, {{ var|filter }}. Intentionally limited — logic should stay in views.


Q: What is template inheritance? {% extends "base.html" %} + {% block content %} allows child templates to fill in blocks from a parent. Promotes DRY layout.


Forms

Q: What are Django Forms? Python classes that handle rendering HTML form fields, validating submitted data, and converting to Python types. forms.Form or forms.ModelForm.


Q: What is ModelForm? Automatically generates form fields from a Model. Reduces duplication between model and form definitions. Override with class Meta: model = …; fields = […].


Q: What is form.is_valid()? Runs all validators. On success, populates form.cleaned_data. On failure, populates form.errors.


Q: What is CSRF protection? Cross-Site Request Forgery protection. Django includes {% csrf_token %} in forms and CsrfViewMiddleware to validate it. Prevents malicious sites from submitting forms on a user’s behalf.


Middleware

Q: What is middleware? Hooks into the request/response cycle globally. Ordered list in MIDDLEWARE. Each middleware processes request (top→down) and response (bottom→up). Used for auth, security headers, sessions, logging, etc.


Q: How do you write custom middleware?

class MyMiddleware:
    def __init__(self, get_response):
        self.get_response = get_response
    def __call__(self, request):
        # before view
        response = self.get_response(request)
        # after view
        return response

Authentication & Permissions

Q: What does Django’s auth system provide? Built-in User model, login/logout views, @login_required, PermissionsMixin, groups, permissions, password hashing (PBKDF2 by default).


Q: How do you extend the User model?

  1. OneToOneField to a Profile model (for extra data).
  2. AbstractUser — inherit and add fields (recommended).
  3. AbstractBaseUser — full control, implement everything yourself.

Q: What is @login_required? Decorator that redirects unauthenticated users to the login page. For CBVs, use LoginRequiredMixin.


Q: What is request.user? The currently logged-in user object. request.user.is_authenticated to check. Anonymous users get AnonymousUser.


Admin

Q: What is the Django Admin? Auto-generated CRUD interface for your models. Register models with admin.site.register(Model) or @admin.register(Model). Customizable with ModelAdmin class.


Q: How do you customize the admin? Override list_display, list_filter, search_fields, ordering, readonly_fields, fieldsets, inlines in a ModelAdmin class.


Signals

Q: What are Django signals? Allow decoupled apps to get notified when certain actions occur. Common: post_save, pre_save, post_delete, m2m_changed. Use @receiver decorator.


Q: When should you avoid signals? When the code is tightly coupled to that model anyway — use model’s save() override instead. Signals make flow hard to trace; use sparingly.


Caching

Q: What caching backends does Django support? Memcached, Redis, database, filesystem, local-memory (dev only). Configure in CACHES. Use cache.set(), cache.get(), or @cache_page.


Static & Media Files

Q: Difference between static and media files?

  • Static — CSS, JS, images bundled with code. Served via collectstatic + CDN/Nginx.
  • Media — user-uploaded files. Configured with MEDIA_ROOT and MEDIA_URL.

Django REST Framework (DRF)

Q: What is DRF? Django REST Framework — powerful toolkit for building RESTful APIs on top of Django. Provides serializers, viewsets, routers, authentication, permissions, and browsable API.


Q: What is a Serializer? Converts complex types (model instances, querysets) to native Python datatypes for JSON rendering, and vice versa for deserialization + validation. ModelSerializer auto-generates from model.


Q: What is a ViewSet? Combines logic for multiple related views (list, create, retrieve, update, destroy) in one class. Register with Router to auto-generate URLs.


Q: What are DRF permissions? IsAuthenticated, IsAdminUser, AllowAny, IsAuthenticatedOrReadOnly. Custom: implement has_permission(request, view).


Q: What is APIView vs GenericAPIView vs ViewSet?

  • APIView — base class, manual handling per HTTP method.
  • GenericAPIView + mixins — adds queryset/serializer convenience.
  • ViewSet — groups CRUD actions; used with Router for clean URL generation.

Q: What is throttling in DRF? Rate limiting. AnonRateThrottle, UserRateThrottle. Configured in settings: DEFAULT_THROTTLE_RATES = {'user': '100/day'}.


Q: What is pagination in DRF? Controls how list responses are chunked. PageNumberPagination, LimitOffsetPagination, CursorPagination. Configure PAGE_SIZE in settings or per view.



🌐 BACKEND / GENERAL


HTTP & REST

Q: What are HTTP methods and their semantics?

MethodPurposeIdempotentSafe
GETRead
POSTCreate
PUTReplace
PATCHPartial update
DELETEDelete

Q: What are common HTTP status codes?

  • 200 OK, 201 Created, 204 No Content
  • 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 405 Method Not Allowed, 422 Unprocessable Entity, 429 Too Many Requests
  • 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable

Q: What is REST? What are its constraints? Representational State Transfer. Constraints: Stateless, Client-Server, Cacheable, Uniform Interface, Layered System, Code on Demand (optional). Stateless = server holds no session; each request is self-contained.


Q: What is the difference between PUT and PATCH?

  • PUT — replaces the entire resource.
  • PATCH — partial update, only sends fields to change.

Q: What is CORS? Cross-Origin Resource Sharing. Browser blocks requests from a different origin unless the server sends Access-Control-Allow-Origin header. In Django: use django-cors-headers.


Q: What is idempotency? Why does it matter? An operation is idempotent if repeating it produces the same result. GET, PUT, DELETE are idempotent. Important for safe retries in distributed systems.


Authentication

Q: Session-based vs Token-based auth?

  • Session — server stores session, client holds a session cookie. Stateful.
  • Token (JWT) — server issues signed token, client sends it in header. Stateless, good for APIs and mobile.

Q: What is JWT? JSON Web Token. Three base64-encoded parts: header.payload.signature. Server signs with secret; anyone can read payload but not forge signature. Short-lived access tokens + refresh tokens is standard pattern.


Q: What is OAuth2? Authorization framework for delegating access. “Login with Google” flow: user grants permission → provider issues access token → your app uses token to access resources on their behalf.


Q: What is the difference between authentication and authorization?

  • Authentication — who are you? (identity)
  • Authorization — what are you allowed to do? (permissions)

Databases

Q: SQL vs NoSQL — when to use which?

  • SQL (PostgreSQL, MySQL) — structured data, relations, ACID, complex queries.
  • NoSQL (MongoDB, Redis) — flexible schema, horizontal scale, document/key-value/graph models. Choose based on data structure and consistency requirements.

Q: What are ACID properties?

  • Atomicity — all or nothing.
  • Consistency — DB stays valid before and after transaction.
  • Isolation — concurrent transactions don’t interfere.
  • Durability — committed data survives crashes.

Q: What is an index? When should you add one? Data structure (B-tree by default) that speeds up lookups at the cost of write overhead and storage. Add on columns frequently used in WHERE, JOIN, ORDER BY. Avoid over-indexing.


Q: What is a database transaction? A sequence of operations treated as a single unit. Either all succeed (commit) or all fail (rollback). In Django: with transaction.atomic():.


Q: What is a database view? A saved SQL query presented as a virtual table. Useful for complex joins, security (expose only certain columns), not for performance (usually not materialized).


Q: Primary Key vs Foreign Key vs Unique Key?

  • PK — uniquely identifies each row, not null, indexed.
  • FK — references PK of another table, enforces referential integrity.
  • Unique — prevents duplicate values in a column, can be null (unlike PK).

Q: What is normalization? Organizing tables to reduce redundancy. Normal forms (1NF, 2NF, 3NF) progressively eliminate data duplication and anomalies. Sometimes denormalize intentionally for read performance.


Q: What are database migrations? Why are they important? Versioned, incremental changes to DB schema tracked in code. Allow team collaboration, rollback, and reproducibility across environments.


Q: What is connection pooling? Reusing existing DB connections instead of creating new ones per request. Reduces overhead. Tools: PgBouncer (PostgreSQL), Django DB connection pooling via CONN_MAX_AGE.


Caching

Q: What is caching? What types exist? Storing results of expensive operations for fast reuse.

  • In-memory — Redis, Memcached (fastest).
  • Database cache — DB table.
  • HTTP cache — browser/CDN (ETags, Cache-Control headers).
  • Application-level@lru_cache, functools.cache.

Q: What is Redis? Common use cases? In-memory key-value store. Use cases: caching, session storage, rate limiting, pub/sub messaging, job queues (Celery broker), leaderboards.


Q: What is cache invalidation? Why is it hard? Deciding when cached data is stale and must be refreshed. Hard because you must invalidate at exactly the right time — too early wastes cache, too late serves stale data.


Async & Task Queues

Q: What is Celery? Distributed task queue for Python. Offloads long-running tasks (emails, image processing) to background workers. Uses Redis or RabbitMQ as broker. Schedule tasks with celery beat.


Q: What is asyncio? When is it useful? Python’s async framework using async/await. Excellent for I/O-bound, high-concurrency tasks (many simultaneous network calls). Not useful for CPU-bound (use multiprocessing).


Q: What is the difference between concurrency and parallelism?

  • Concurrency — dealing with multiple tasks at once (may interleave).
  • Parallelism — executing multiple tasks literally simultaneously (multiple cores). Python threads give concurrency; multiprocessing gives parallelism.

APIs & Design

Q: What is API versioning? How do you do it? Allows evolving the API without breaking clients. Strategies: URL prefix (/api/v1/), header (Accept: application/vnd.api+json;version=1), query param (?version=1). URL prefix is most common.


Q: What is rate limiting? Restricting how many requests a client can make in a time window. Protects from abuse and overload. Implement with Redis counters or DRF’s throttling classes.


Q: What is pagination? Why is it needed? Returning large datasets in chunks. Without it, returning thousands of rows degrades performance. Common: page-based (?page=2), cursor-based (for real-time feeds), offset-limit.


Q: What is GraphQL vs REST?

  • REST — resource-based URLs, fixed response shape.
  • GraphQL — single endpoint, client specifies exact data shape, prevents over/under-fetching. More complex setup but flexible.

Q: What is a webhook? Server-to-server push notification. Instead of polling, the provider sends an HTTP POST to your endpoint when an event occurs (payment completed, etc.).


Security

Q: What is SQL injection? How to prevent it? Attacker injects SQL via user input. Prevent by using parameterized queries / ORM (never string-format SQL). Django ORM is safe by default.


Q: What is XSS? Cross-Site Scripting — attacker injects malicious scripts into web pages viewed by others. Prevent by escaping output (Django templates auto-escape), Content-Security-Policy headers.


Q: What is CSRF? Cross-Site Request Forgery — tricks authenticated user’s browser into making an unwanted request. Django prevents it with CSRF tokens in forms.


Q: What is HTTPS / TLS? Encrypts HTTP traffic using TLS. Prevents eavesdropping and MITM attacks. Always use in production; redirect HTTP → HTTPS. Django: set SECURE_SSL_REDIRECT = True.


Q: What is password hashing? What algorithm does Django use? Never store plain-text passwords. Hash with a one-way function + salt. Django uses PBKDF2 with SHA-256 by default. Argon2 and bcrypt are also supported and recommended.


Q: What is the principle of least privilege? Users/services should have only the minimum permissions required. Apply to DB users, API keys, file permissions, IAM roles.


Testing

Q: What types of tests should a backend have?

  • Unit tests — test individual functions/methods in isolation.
  • Integration tests — test multiple components together (views + DB).
  • End-to-end tests — test full request/response cycle.

Q: What is pytest? How does it differ from unittest? pytest is a more Pythonic, less boilerplate testing framework. Fixtures > setUp/tearDown, simpler assertions, powerful plugins. Django: use pytest-django.


Q: What is mocking? When do you use it? Replacing real objects with fakes during tests. Use when testing code that calls external services, DB, or APIs. unittest.mock.patch / MagicMock.


Q: What is TestCase in Django? Extends unittest.TestCase. Wraps each test in a transaction that is rolled back — keeps tests isolated. Use Client to simulate HTTP requests.


Q: What is test coverage? Percentage of code executed by tests. Use coverage.py + pytest-cov. Aim for meaningful coverage, not 100% at all costs.


DevOps Basics

Q: What is Docker? Why use it? Containerizes applications with their dependencies. Ensures “works on my machine” becomes “works everywhere.” Dockerfile builds image; docker-compose orchestrates multi-container apps.


Q: What is a .env file? Why is it important? Stores environment-specific config (secrets, DB URLs) outside of code. Never commit to git. Use python-decouple or django-environ to load in Django.


Q: What is CI/CD?

  • CI (Continuous Integration) — automatically run tests on every push.
  • CD (Continuous Deployment) — automatically deploy if tests pass. Tools: GitHub Actions, GitLab CI, Jenkins.

Q: What is a reverse proxy? Why use Nginx with Django? Nginx sits in front of Django (Gunicorn), handles static files, SSL termination, load balancing, and passes dynamic requests to Gunicorn. Django/Gunicorn should never face the internet directly.


Q: What is Gunicorn? WSGI HTTP server for Python apps. Runs multiple worker processes to handle concurrent requests. Command: gunicorn myproject.wsgi:application --workers 4.


Q: What is WSGI vs ASGI?

  • WSGI — synchronous interface; standard for traditional Django apps.
  • ASGI — asynchronous; supports WebSockets, long-polling, HTTP/2. Django 3.0+ supports ASGI via Daphne/Uvicorn.

Version Control

Q: Git workflow basics? git initgit addgit commit. Branches for features (git checkout -b feature/x). merge or rebase back to main. pull request for code review. Never commit secrets.


Q: What is git rebase vs git merge?

  • merge — creates a merge commit, preserves history.
  • rebase — replays commits on top of another branch, linear history. Don’t rebase shared/public branches.

System Design Basics (Junior Level)

Q: What is horizontal vs vertical scaling?

  • Vertical — bigger machine (more RAM/CPU). Has limits.
  • Horizontal — more machines. Requires stateless app design and load balancer.

Q: What is a load balancer? Distributes incoming requests across multiple servers. Prevents single server overload. Can do health checks and SSL termination.


Q: What is a CDN? Content Delivery Network — geographically distributed servers that cache static assets (images, JS, CSS) closer to users, reducing latency.


Q: What is message queue? Give an example. Decouples producers and consumers of work. Producer sends a message; consumer processes it async. Examples: RabbitMQ, Redis (Celery), AWS SQS. Prevents bottlenecks and retains tasks on failure.


Q: What is idempotency key? A unique ID sent with a request so the server can detect and ignore duplicate retries, ensuring the operation only runs once.


💡 Quick Tips for Tomorrow

  • Always explain your reasoning out loud, not just the answer.
  • For tricky questions, start with a simple example, then generalize.
  • “I haven’t used that, but here’s how I’d approach learning it” beats silence.
  • Know your projects deeply — they’ll ask about trade-offs you made.