E-Commerce

Chapter 4
E-Commerce Technology Architecture

Bachelors Program in IT
E-Commerce   •   Bachelor

E-Commerce Technology Architecture

Introduction and Context

E-commerce technology architecture is the organized structure of software, data, infrastructure, interfaces, security controls, and operational practices that enable digital buying and selling. It connects customer-facing experiences—such as web stores and mobile applications—with product information, inventory, pricing, payment, order fulfilment, customer service, analytics, and external business partners.

An e-commerce site is therefore not merely a collection of web pages. It is a socio-technical system: technology supports business processes, while people, policies, suppliers, regulators, and customers influence how that technology is designed and operated. A technically attractive store can still fail if product data is inaccurate, payment processes are unreliable, or fulfilment systems cannot meet promised delivery times.

A sound architecture should balance six objectives:

  1. Business capability: support merchandising, selling, fulfilment, marketing, and service.
  2. Scalability: handle growth in users, transactions, data, and geographical reach.
  3. Reliability: remain available and recover quickly from failures.
  4. Security and privacy: protect accounts, payment information, and personal data.
  5. Interoperability: exchange data reliably with internal and external systems.
  6. Adaptability: permit new channels, products, partners, and technologies.

Learning Objectives

After completing this chapter, students should be able to:

  • describe the major layers and components of an e-commerce architecture;
  • distinguish storefronts, commerce platforms, content platforms, databases, APIs, microservices, and cloud services;
  • explain mobile commerce and headless architecture;
  • compare build, buy, SaaS, and open-source approaches;
  • evaluate alternatives using scalability, reliability, cost, security, and interoperability;
  • identify architectural risks and recommend an appropriate solution for a business case.

1. A Layered E-Commerce Architecture

A useful conceptual model separates an e-commerce system into interconnected layers.

  • Experience layer: websites, mobile applications, social-commerce interfaces, kiosks, and voice or conversational interfaces.
  • Experience-management layer: content management, search, personalization, recommendations, and presentation logic.
  • Commerce layer: catalogue, pricing, promotions, cart, checkout, customer accounts, orders, payments, and tax calculation.
  • Data layer: operational databases, search indexes, caches, data warehouses, event streams, and product information repositories.
  • Integration layer: APIs, message brokers, webhooks, adapters, and external partner connections.
  • Infrastructure layer: computing, networks, storage, identity, monitoring, backup, and security services.

These layers are logical rather than necessarily separate physical products. A small business may obtain most functions from one platform, whereas a large retailer may use specialized products connected through APIs and events.

Layered e-commerce technology architecture Experience: web, mobile, social, kiosk Content and experience management Commerce: catalogue, cart, checkout, orders Data and integration: databases, APIs, events Cloud or on-premises infrastructure and operations
Layered e-commerce technology architecture
Figure: Layered e-commerce technology architecture

Figure: Logical layers of an e-commerce technology architecture.

The flow is not strictly one-way. For example, a payment service may send an event to the order system, and inventory availability may influence what the storefront displays. Good architecture makes these dependencies explicit rather than allowing uncontrolled point-to-point connections.

2. Storefronts and Commerce Platforms

A storefront is the customer-facing interface through which users browse, search, compare, purchase, and track products. Its responsibilities commonly include navigation, product detail pages, cart presentation, checkout forms, account management, accessibility, localization, and responsive design.

A commerce platform provides business capabilities behind the storefront. Typical modules include:

  • product and variant management;
  • inventory and availability;
  • price lists, discounts, coupons, and promotions;
  • cart and checkout;
  • order management and returns;
  • customer profiles and segmentation;
  • payment and tax integration;
  • shipping and fulfilment integration;
  • reporting and administration.

A platform may be monolithic, where many capabilities are deployed as one application, or composable, where specialized services are assembled through interfaces. Monoliths can be simpler to deploy and operate at smaller scale. Composable systems can allow independent replacement and scaling, but they introduce integration, monitoring, testing, and governance costs.

The distinction between a storefront and a commerce platform is important. Replacing the visual design of a storefront need not require replacing pricing or order management. Conversely, a platform change can affect every channel and partner, even when the storefront remains visually unchanged.

3. Content Management and Product Information

A content management system (CMS) manages editorial material such as articles, landing pages, banners, videos, buying guides, and campaign content. A product information management (PIM) system manages structured product information, including names, descriptions, dimensions, technical specifications, images, translations, and channel-specific attributes.

Content and commerce overlap but are not identical. A CMS answers questions such as “Which campaign page should be displayed?” A commerce engine answers “What is the current price, can the item be purchased, and how should the order be recorded?” Combining them without clear ownership may produce inconsistent prices or duplicated product data.

A useful governance practice assigns a system of record for each critical data domain:

Data domainPossible system of recordImportant controls
Product attributesPIM or ERPvalidation, versioning, approval
PriceCommerce platform or ERPeffective dates, currency, authorization
InventoryInventory or ERP systemreservation, synchronization frequency
Editorial contentCMSworkflow, rights, publication status
OrdersOrder management systemimmutability, audit trail, reconciliation
Customer identityIdentity platformconsent, authentication, access control

4. Databases, Search, Caching, and Data Flow

The database stores durable business data. Relational databases represent information in tables with defined relationships and are well suited to orders, payments, customers, and inventory transactions. Their transaction properties help preserve consistency. For example, an order should not be marked as paid while its payment record is missing.

NoSQL databases include document, key-value, column-family, and graph models. They can be appropriate for high-volume catalogues, session data, recommendation data, or rapidly changing access patterns. They are not automatically superior to relational databases; the selection should follow data relationships, consistency needs, query patterns, and operational skills.

A search engine usually maintains an index optimized for text search, filtering, sorting, and relevance ranking. The index may be derived from the product database and can therefore be temporarily out of date. This creates an important design distinction: the database is generally authoritative, while the search index is a performance-oriented representation.

A cache stores frequently requested data closer to the consumer. Caching can reduce response time and database load, but stale prices, stock levels, or promotional rules can cause commercial and legal problems. Cache policies should distinguish relatively stable content from transaction-critical information.

Data movement may be:

  • synchronous, where a caller waits for a response, such as checking payment authorization;
  • asynchronous, where a message or event is processed later, such as sending an order to a warehouse;
  • batch-based, where records are transferred periodically, such as nightly financial reconciliation.

The choice affects user experience, consistency, failure handling, and operational complexity.

5. APIs, Events, and Interoperability

An application programming interface (API) is a defined contract through which software requests data or actions. Common styles include REST over HTTP, GraphQL, and gRPC. An API contract should define authentication, inputs, outputs, errors, versioning, rate limits, idempotency, and data protection.

An idempotent operation produces the same intended business result when repeated. This is important because networks fail and clients may retry requests. A payment or order-creation operation should use an idempotency key or equivalent mechanism to prevent accidental duplication.

An event records that something happened, such as OrderPlaced, PaymentAuthorized, or ShipmentDispatched. Event-driven architecture allows consumers such as inventory, email, analytics, and fulfilment to react independently. However, events do not eliminate the need for data ownership, ordering rules, retry policies, dead-letter handling, and reconciliation.

Interoperability requires more than technical connectivity. Systems must agree on meaning. “Available stock,” for example, might mean physical units, sellable units after safety stock, or units not already reserved. Shared schemas, data dictionaries, identifiers, and documented lifecycle states reduce ambiguity.

6. Microservices and Distributed Architecture

A microservice is a relatively small, independently deployable service organized around a business capability. Examples include catalog, pricing, identity, cart, payment, and order services. A service should generally own its data and expose behavior through a stable contract.

Benefits may include independent deployment, selective scaling, fault isolation, and team autonomy. Costs include distributed failure, network latency, duplicated operational tooling, complex testing, data consistency challenges, and a larger need for observability.

Microservices should not be adopted simply because they are fashionable. A modular monolith can provide clear internal boundaries while avoiding unnecessary network calls. The appropriate architecture depends on organizational size, release frequency, domain complexity, traffic patterns, and operational maturity.

Distributed systems commonly provide eventual consistency, meaning different components may temporarily hold different states before they converge. This is acceptable for some functions, such as search indexing or analytics, but risky for payment authorization or inventory reservation. Where a single distributed transaction is impractical, designers may use a saga: a sequence of local transactions with compensating actions if a later step fails.

7. Cloud Services and Operational Architecture

Cloud computing provides on-demand infrastructure and managed services through a provider. Important service models include:

  • Infrastructure as a Service (IaaS): virtual machines, networks, and storage;
  • Platform as a Service (PaaS): managed runtime, databases, queues, and deployment environments;
  • Software as a Service (SaaS): a complete application operated by a provider;
  • serverless services: execution or data services where infrastructure management is largely abstracted.

Cloud architecture can improve elasticity, geographic reach, managed backups, and access to specialized capabilities. It does not automatically guarantee availability or lower total cost. Poorly designed cloud systems can become expensive, difficult to migrate, or vulnerable to misconfiguration.

Reliability is often analyzed through availability. If a service is available for time Ta during an observation period T, then observed availability is:

A = Ta / T

Here, A is dimensionless availability, Ta is successful operating time, and T is total observed time. For a 30-day month, one “nine” of availability, 99.9%, permits approximately:

30 × 24 × 60 × (1 − 0.999) = 43.2 minutes

This calculation assumes a 30-day month and that all unavailable time counts equally. Service-level agreements may define exclusions and measurement methods differently. High availability requires redundancy, health checks, graceful degradation, backups, tested restoration, and incident response—not merely a cloud subscription.

A related operational measure is mean time to recovery (MTTR), the average time required to restore service after failure. Reducing MTTR through automation and rehearsed procedures may be more economical than attempting to prevent every failure.

8. Mobile Commerce

Mobile commerce includes transactions conducted through mobile browsers, native applications, progressive web applications, wallets, social platforms, and location-aware services. Mobile architecture must account for small screens, intermittent connectivity, battery constraints, permissions, device diversity, and touch interaction.

Important design practices include:

  • responsive, accessible interfaces;
  • short and recoverable checkout flows;
  • secure tokenized payment rather than storing sensitive card data unnecessarily;
  • deep links from notifications and campaigns;
  • careful consent for location, contacts, and notifications;
  • local caching with clear handling of stale information;
  • app and API version compatibility;
  • protection against insecure storage and reverse engineering.

Native applications can offer strong device integration and performance, whereas web and progressive web applications can reduce installation friction. The correct choice depends on customer frequency, required device capabilities, development resources, and distribution strategy.

9. Headless and Composable Commerce

In a headless architecture, the presentation layer is separated from the commerce backend. The backend exposes APIs, while web, mobile, in-store, partner, and social channels consume those capabilities. This supports multiple experiences and allows front-end teams to work independently.

Headless architecture can improve channel flexibility and enable experimentation. It also transfers responsibility to the organization for front-end performance, accessibility, SEO, API orchestration, authentication, caching, and integration testing. “Headless” is therefore not automatically better; it is a trade-off between experience independence and system complexity.

Composable commerce extends this idea by assembling best-of-breed components—such as a CMS, search service, payment provider, tax engine, and order management service—around standardized interfaces. The organization must manage vendor contracts, data consistency, observability, release coordination, and the risk that one component changes its API or pricing.

10. Build, Buy, SaaS, and Open Source

Organizations usually choose among four broad sourcing strategies.

ApproachStrengthsRisks and limitationsSuitable when
Build customMaximum control and differentiationHigh cost, long delivery, maintenance burdenRequirements are unique and strategically important
Buy packaged softwareEstablished features and vendor supportFit gaps, licensing cost, upgrade constraintsCommon business processes are needed quickly
SaaSFast deployment, provider-operated infrastructureData portability, recurring cost, provider dependencyStandardized capability and rapid launch matter
Open sourceSource visibility, flexibility, community ecosystemSecurity and maintenance responsibility, variable supportTechnical capability exists and customization is valuable

The decision should consider total cost of ownership rather than acquisition price alone. Total cost includes licensing, implementation, integration, data migration, training, operations, security, upgrades, support, and exit or replacement costs.

A weighted decision model can make assumptions explicit. If alternative j receives score sij on criterion i, and criterion weight wi satisfies ∑wi = 1, then:

Sj = ∑i=1n wi sij

This is a prioritization tool, not an objective proof. Scores are judgment-based and should be tested through sensitivity analysis. For example, a retailer may weight reliability and integration more heavily than visual customization.

11. Security, Privacy, and Governance

E-commerce architecture handles identity, addresses, purchase histories, payment tokens, and behavioral data. Security must be designed into every layer. Core controls include least privilege, strong authentication, encryption in transit and at rest, secure secrets management, input validation, dependency management, vulnerability testing, logging, fraud detection, and incident response.

Payment card data should be minimized and delegated to appropriately compliant payment providers where possible. Tokenization can reduce exposure, but it does not remove all security obligations. Privacy governance requires a lawful purpose, data minimization, transparent notices, retention limits, access controls, and mechanisms for handling user rights according to applicable law.

Architectural governance should define who approves APIs, data schemas, vendor choices, access rights, and production changes. Logs should support accountability without unnecessarily collecting sensitive information. Automated decision systems, including recommendation and fraud models, should be monitored for bias, inappropriate exclusion, explainability concerns, and security abuse.

12. Illustrative Case: Northstar Outdoor Equipment

Background. Northstar is a growing retailer selling outdoor equipment through 40 physical stores and a web store. Its legacy platform contains catalogue, checkout, and order functions in one application. Marketing wants richer content and a mobile application; operations wants accurate stock across stores and warehouses.

Problem. During seasonal campaigns, page traffic increases sharply. The monolithic application becomes slow, search results show unavailable products, and a failed warehouse integration delays order confirmation. The company is considering a complete custom rebuild, a SaaS platform, or a modular architecture.

Analysis. A complete rebuild would provide control but would create substantial delivery and maintenance risk. A single SaaS product could accelerate launch but might not support Northstar’s store-level inventory rules. The most important capabilities are reliable order processing, inventory visibility, mobile performance, content flexibility, and integration with the existing enterprise resource planning system.

Approach. Northstar adopts a staged, headless design. The existing order system remains the initial system of record. A CMS manages editorial content, a search index supports fast discovery, and APIs expose catalogue, price, cart, and order capabilities. Inventory is published through events, but checkout performs a current availability check before accepting payment. A managed cloud database and queue reduce infrastructure administration. The team introduces contract testing, centralized logs, idempotency keys, and reconciliation reports.

The company does not immediately split every function into microservices. It first establishes modular boundaries and extracts search and content delivery, where independent scaling has clear value. Payment remains with a specialized provider, reducing sensitive-data exposure.

Outcome. Campaign pages scale independently from order processing. Search becomes faster, while the checkout availability check reduces overselling. The architecture still requires governance: event delays, API versioning, vendor costs, and operational skills become ongoing responsibilities.

Learning points. Architecture should follow business capabilities rather than fashion. A phased transition reduces risk. The most reliable design separates authoritative transaction processing from derived search and content representations. Interoperability and operational discipline are as important as component selection.

13. Best Practices and Limitations

Effective e-commerce architecture commonly follows these practices:

  • begin with business capabilities and quality attributes;
  • document data ownership and lifecycle states;
  • prefer stable, versioned APIs and explicit contracts;
  • design retries, timeouts, idempotency, and failure recovery;
  • keep payment, identity, and personal data exposure minimal;
  • measure performance using realistic user journeys, not only server response time;
  • test peak loads, dependency failures, restoration, and security controls;
  • use observability—metrics, logs, traces, and meaningful alerts;
  • adopt incremental modernization rather than unnecessary replacement;
  • assess vendor lock-in, portability, exit plans, and total cost;
  • include accessibility, privacy, sustainability, and regulatory compliance in design reviews.

No architecture eliminates trade-offs. Greater decomposition may improve independent scaling but increase operational overhead. SaaS may reduce infrastructure work but increase dependency on provider policies. Open source may provide flexibility but requires responsible maintenance. Cloud services may improve elasticity but create cost and governance risks. Architectural quality is therefore contextual: a design is good when it reliably supports its intended business and user outcomes within acceptable constraints.

Chapter Summary

E-commerce technology architecture connects customer experiences with content, commerce operations, data, integrations, and infrastructure. Storefronts provide interaction, while commerce platforms manage catalogue, pricing, carts, checkout, orders, and fulfilment. CMS and PIM systems organize editorial and product information, and databases, indexes, caches, APIs, and events support storage and interoperability.

Monolithic, modular, microservice, headless, and composable designs offer different balances of simplicity, flexibility, scalability, and operational complexity. Cloud services provide useful managed capabilities but do not remove the need for reliability engineering, security, cost management, or governance. Mobile commerce introduces device and connectivity constraints. Build, buy, SaaS, and open-source choices should be evaluated through business fit, total cost, reliability, scalability, security, and exit risk.

The central architectural principle is deliberate separation of concerns with clear ownership and contracts. Successful systems are not defined by the number of services or the novelty of their technology; they are defined by dependable customer and business outcomes.

Key Terms

API: A contract through which software requests data or actions from another system.

Availability: The proportion of an observation period during which a service is operational.

Cache: Temporary storage used to serve frequently requested data quickly.

Commerce platform: Software supporting product, pricing, cart, checkout, order, payment, and related functions.

Composable commerce: An architecture assembled from replaceable specialized commerce components.

Content management system (CMS): Software for creating, organizing, approving, and publishing editorial content.

Event: A record that a business or system occurrence has happened.

Eventual consistency: A condition in which distributed copies may differ temporarily but converge later.

Headless architecture: Separation of a presentation layer from backend capabilities exposed through APIs.

Idempotency: The property that repeating an operation does not create an unintended additional effect.

Microservice: An independently deployable service organized around a business capability.

NoSQL database: A non-relational database family including document, key-value, column, and graph models.

PIM: Product information management system for structured product data and enrichment.

Relational database: A database organizing data into related tables and supporting structured transactions.

SaaS: Software operated by a provider and delivered as a service, commonly through the internet.

Saga: A sequence of local distributed transactions coordinated with compensating actions.

Storefront: The customer-facing interface for browsing and purchasing.

System of record: The authoritative source for a particular data domain.

Total cost of ownership: All significant acquisition, implementation, operation, maintenance, and exit costs.

Webhook: An HTTP callback used to notify another system that an event has occurred.

Review Questions

Short Answer Questions

  1. What is the difference between a storefront and a commerce platform?
  2. Why should an organization identify a system of record for each data domain?
  3. What is an API idempotency key used for?
  4. State two advantages and two risks of microservices.
  5. What distinguishes headless commerce from a traditional tightly coupled storefront?

Long Answer Questions

  1. Explain the major layers of an e-commerce architecture and the relationships among them.
  2. Compare relational databases, NoSQL databases, search indexes, and caches in an e-commerce system.
  3. Discuss how cloud services can improve scalability and reliability while creating new risks.
  4. Compare build, buy, SaaS, and open-source sourcing strategies using total cost and interoperability.
  5. Explain the security, privacy, and governance requirements of a modern e-commerce architecture.

Analytical / Application Questions

  1. A retailer has unpredictable campaign traffic, slow search, and inaccurate inventory. Recommend an architectural improvement plan and justify the sequencing of your changes.
  2. Using the weighted decision model, design criteria and weights for choosing between a SaaS commerce platform and a custom platform for a regulated retailer. Explain how you would test sensitivity to the weights.
  3. An order service receives the same checkout request three times because of network retries. Design an API and data-handling approach that prevents duplicate orders while still allowing safe retries.

Multiple Choice Questions with Answers

Question 1

Which component is primarily responsible for managing editorial pages, banners, and buying guides?

A. Content management system

B. Payment gateway

C. Inventory reservation service

D. Message broker

Correct Answer: A. Content management system

Question 2

What is the principal purpose of an idempotency key in an order or payment API?

A. To compress the request body

B. To prevent an unintended duplicate effect when a request is retried

C. To increase the number of database tables

D. To replace user authentication

Correct Answer: B. To prevent an unintended duplicate effect when a request is retried

Question 3

Which statement best describes a search index in an e-commerce system?

A. It must always be the authoritative source for payment records

B. It is usually optimized for retrieval and may be derived from a product database

C. It can only store customer passwords

D. It eliminates the need for product data governance

Correct Answer: B. It is usually optimized for retrieval and may be derived from a product database

Question 4

A service is available for 99.9% of a 30-day month. Approximately how much downtime does this permit?

A. 4.32 minutes

B. 43.2 minutes

C. 432 minutes

D. 4,320 minutes

Correct Answer: B. 43.2 minutes

Question 5

Which is a characteristic of eventual consistency?

A. All distributed copies are updated instantaneously

B. Copies may temporarily differ before converging

C. No data can be stored in a database

D. Transactions never require error handling

Correct Answer: B. Copies may temporarily differ before converging

Question 6

Which architecture separates the presentation layer from commerce capabilities exposed through APIs?

A. Headless architecture

B. Batch-only architecture

C. Single-table architecture

D. Offline-only architecture

Correct Answer: A. Headless architecture

Question 7

Which sourcing option generally places infrastructure operation and application maintenance primarily with a provider?

A. SaaS

B. Custom build

C. Self-hosted open source

D. Manual spreadsheet processing

Correct Answer: A. SaaS

Question 8

Why might a retailer retain a modular monolith instead of immediately adopting microservices?

A. A modular monolith can reduce distributed-system and operational complexity

B. A modular monolith cannot contain business logic

C. Microservices cannot use APIs

D. Monoliths always scale without limits

Correct Answer: A. A modular monolith can reduce distributed-system and operational complexity

Question 9

Which data practice most directly reduces ambiguity between integrated systems?

A. Using undocumented field names

B. Defining shared schemas, identifiers, and data ownership

C. Removing all validation rules

D. Allowing every system to overwrite every record

Correct Answer: B. Defining shared schemas, identifiers, and data ownership

Question 10

Which factor is most important when evaluating a cloud architecture for reliability?

A. The number of colours in the user interface

B. Redundancy, recovery procedures, monitoring, and tested restoration

C. Whether the system has the largest possible number of microservices

D. Whether all data is permanently cached

Correct Answer: B. Redundancy, recovery procedures, monitoring, and tested restoration

E-Commerce
Chapter 4 of 15