Application architecture · Modernisation lab

Order Processing
Modernisation.

Establishing how a synchronous order API responds to a slow dependency, then evaluating an event-driven alternative against the measured baseline.

Status: Synchronous baseline complete. Event-driven implementation pending.

01 · Problem

Dependency delays affect the caller.

This lab investigates an order-processing flow in which email processing remains on the synchronous request path. The baseline varies simulated email delay and measures the API response time experienced by the client.

02 · Requirements and decisions

Measure before changing the design.

The baseline retains synchronous processing so the effect of dependency delay can be observed directly. An asynchronous alternative will be evaluated in a later phase.

Business acceptance targets and detailed architecture diagrams will be added as the project develops.

03 · Implementation and testing

A controlled local baseline.

These tests examine response latency with one request at a time. They do not measure concurrent-load capacity.

04 · Measured outcomes

Response time tracks email delay.

Synchronous baseline: five requests per delay setting
Simulated email delay Average API response time
100 ms934 ms
300 ms1,124 ms
500 ms1,323 ms
1,000 ms1,828 ms
2,000 ms2,829 ms
5,000 ms5,823 ms

All 30 requests returned HTTP 200. Across this test mix, average response time was 2,310 ms and the maximum was 5,828 ms. Displayed averages are rounded to the nearest millisecond.

Increasing simulated email delay from 100 ms to 5,000 ms increased average API response time by approximately 4,888 ms. This is consistent with email processing remaining on the synchronous request path.

HTTP 200 confirms the recorded API status; it does not independently verify email delivery or order correctness.

05 · Lessons and next steps

Evaluate decoupling against this baseline.

The results provide a reason to investigate moving email work out of the request path. The next phase will evaluate an Amazon SQS-based design.

The comparison must distinguish API acknowledgement latency from end-to-end processing time. It must also examine failure handling, retries, duplicate processing and operational visibility.

Limitations