Architecture Interview Questions - Technical Reference
Architect vs Tech Lead
Main concerns:
- Architect: Cross-cutting concerns, system-wide design, technology strategy
- Tech Lead: Team execution, code quality, sprint delivery
Key questions:
- Most difficult aspect switching from TL to Solution Architect?
- Mentoring strategy?
- Establishing and enforcing guidelines/best practices?
- Relationship with Tech Leads in design/development?
Web Architecture Styles
Reference: Common Web Application Architectures
Monolithic
- Single deployment unit
- Tight coupling
N-layers
- Presentation → Business Logic → Data Access
- Horizontal slicing
Clean Architecture (Onion/Hexagonal)
- Domain-centric dependency organization
- Dependency Inversion Principle
- Deep dive
Vertical Slice Architecture
- Feature-based slicing
- Jimmy Bogard’s approach
Event-Driven Architecture
Event vs Message:
- Event: Something that happened (past tense)
- Message: Command or request (imperative)
Eventual Consistency:
- BASE (Basically Available, Soft-state, Eventually-consistent)
- vs ACID (Atomic, Consistent, Isolated, Durable)
Message Brokers:
- Azure ServiceBus/RabbitMQ: Guaranteed delivery, message queuing
- Kafka/Azure Event Hub: High-throughput event streaming
Kafka setup considerations:
- Environment strategy
- Throughput requirements
- Cost-control measures
- Scaling strategies
Domain-Driven Design (DDD)
Core concepts:
- Entity: Identity-based object
- Value Object: Immutable, equality by value
- Aggregate: Consistency boundary
Relation to microservices:
- Bounded contexts map to service boundaries
- Domain models guide service decomposition
Microservices
vs SOA:
- Microservices: Fine-grained, independent deployment
- SOA: Coarser services, shared infrastructure
Trade-offs:
- Benefits: Scalability, technology diversity, fault isolation
- Costs: Distributed system complexity, data consistency challenges
Data management:
- Database per service pattern
- Eventual consistency
- Saga pattern for distributed transactions
Monolith to microservices:
- Strangler Fig pattern
- Branch by Abstraction
- Extract service incrementally
Authentication & Authorization
OAuth + OIDC:
- OAuth 2.0: Authorization framework
- OIDC: Authentication layer on OAuth
Flows:
Authorization Code: Server-to-server communication
Authorization Code + PKCE: Public clients (SPAs, mobile)
Resource Owner Password: Legacy (avoid if possible)
High Availability on Azure
Infrastructure:
- Availability Zones: Zone-redundant deployment
- Multi-region: Cross-region replication
Deployment strategies:
Active-Active: Load balanced across regions
Active-Passive: Failover to standby region
RPO (Recovery Point Objective): Max acceptable data loss
RTO (Recovery Time Objective): Max acceptable downtime
Deployment patterns:
- Blue/Green: Zero-downtime deployment via environment swap
- Canary: Gradual traffic shift to new version
Transactional Messaging
Outbox pattern:
// Ensure exactly-once message publishing
using (var transaction = dbContext.Database.BeginTransaction())
{
// 1. Save business entity
dbContext.Orders.Add(order);
// 2. Save message to outbox table
dbContext.OutboxMessages.Add(new OutboxMessage
{
Payload = JsonSerializer.Serialize(orderCreatedEvent)
});
await dbContext.SaveChangesAsync();
await transaction.CommitAsync();
}
// 3. Background process publishes from outbox
Cache vs Database
Key differences:
- Cache: In-memory, fast reads, volatile
- Database: Persistent, ACID guarantees, durable
Why not cache-only storage?
- Durability requirements
- Data size constraints
- Cost at scale
Kubernetes/Docker on AKS
Core components:
## Pod: Smallest deployable unit
## Service: Stable network endpoint
## Ingress: External access routing
## ConfigMap/Secret: Configuration management
Additional concerns:
- Service mesh (Istio/Linkerd): Traffic management, observability
- Security: RBAC, Network Policies, Pod Security Standards
- Helm: Package management
CI/CD
Definitions:
CI (Continuous Integration): Automated build + test on commit
CD (Continuous Delivery): Always releasable, manual deployment trigger
CD (Continuous Deployment): Automated production deployment
Branching strategies:
- Trunk-based: Short-lived branches, frequent integration
- GitFlow: Feature/develop/release/hotfix branches
- GitHub Flow: Main + feature branches
Non-Functional Requirements (NFRs)
Also known as:
- Quality Attributes
- Architecturally Significant Requirements (ASRs)
Categories:
- Performance: Response time, throughput
- Scalability: Load handling capacity
- Security: Authentication, authorization, encryption
- Reliability: Uptime, fault tolerance
- Maintainability: Code quality, testability
References:
Technical Governance
Documentation approach:
- Architecture Decision Records (ADRs)
- C4 model diagrams (Context, Container, Component, Code)
- Living documentation in code
Diagram types:
- System Context: External dependencies
- Container: High-level technology choices
- Component: Internal structure
- Sequence: Interaction flows
Agile Methodology
Core principle: Iterative delivery, customer collaboration, responding to change
SCRUM ceremonies:
- Sprint Planning
- Daily Standup
- Sprint Review
- Retrospective
Requirement lifecycle with Architect:
PO defines requirement
↓
Architect reviews for technical feasibility/NFRs
↓
SM facilitates refinement with Tech Lead + Dev Team
↓
Sprint Planning: Architect provides design guidance
↓
Development: Tech Lead ensures implementation quality
↓
Review: Architect validates solution
React Native (Mobile)
React Native vs Native:
- Code sharing across iOS/Android
- Faster development cycle
- Trade-off: Performance, platform-specific features
SDLC setup:
## Branching
main → develop → feature branches
## Environments
- Development (TestFlight/Internal Testing)
- Staging (External beta)
- Production (App Store/Play Store)
## Testing
- Unit: Jest
- Integration: Detox/Appium
- Manual: Device farm testing
Web + Mobile code sharing:
- Shared business logic layer
- Platform-specific UI components
- Monorepo with Nx/Turborepo
Module decoupling:
// Feature-based structure
/features
/auth
/orders
/profile
// Dependency injection for cross-cutting concerns
const container = createContainer();
container.register('api', ApiService);
container.register('auth', AuthService);
Microfrontends:
- Module Federation (Webpack 5)
- Independent deployment of UI modules
- Runtime integration
Interview Assessment Criteria
- Non-functional requirements identification
- Architecture pattern knowledge and experience
- NFR-based architecture scoring
- Service communication strategies
- Data storage design
- Dependency and release management
- High availability solutions
- Observability implementation
- Communication clarity