Real-Time Decisioning Demo | Oil & Gas Upstream — Production Optimization
Pipeline<10ms
1 / 9
1
Architecture
2
Well Event
3
Ingest
4
Context
5
Features
6
Decision
7
Impact
8
Outcome
9
Recap
Stage 1: The Architecture
Real-time oilfield production decisioning stack.
Every producing well continuously generates telemetry that can trigger an optimization decision. Acting on that decision is only valuable if the recommendation arrives before well conditions change again. Redis assembles the live well state, completion context, optimization features, and operating constraints from scattered systems into one serving path — fast enough to close the loop between detection and action.
Data Sources

PI Historian / SCADA

Real-time well telemetry — pressure, temperature, flow rate, ESP current, choke position, GOR — from field sensors and surface equipment

Operations Database

Completion records, well design, perforation intervals, artificial lift configuration — Postgres

Kafka / Event Stream

Telemetry alarms, well state change events, manual operator interventions streaming in real time

Databricks / ML Platform

Offline-trained production optimization and decline curve models — lakehouse + feature computation

ERP / Planning

Production targets, economics, hedged volumes, AFE budgets

Ingest Layer

Redis Data Integration (RDI)

CDC from Postgres operations DB — completion data, well design, equipment specs, production history — YAML pipelines, sub-second lag, 0 custom ETL

Kafka

Live telemetry alarms, well state events, GOR/BHP change notifications — streaming into Redis RAM as they occur

Redis Context · Production Operational Store

Redis RAM

Live well state — current choke, ESP frequency, BHP/THP readings, GOR signal, recent alarm history

Redis Flex

18-month production history, completion context, lift performance curves, equipment maintenance records at tiered cost

Redis Search

Similar well pattern library, optimization model output vectors, peer well benchmarks

Production Optimization Engine

Lift Performance Model

ESP and gas-lift efficiency optimization across choke/frequency/injection dimensions

Decline Curve Model

Production trend and GOR evolution prediction — Databricks-trained, Redis-served online

Constraint Engine

Facility capacity, pipeline constraints, safety limits, operating envelope enforcement

Setpoint Recommender

Ranked operating target recommendations with confidence and economic impact

Output Channels

DCS / Control System

Choke setpoint, ESP frequency target — deployed automatically or advisory to operator

Operator Dashboard

Recommendation rationale, well context, accept/override interface

Digital Twin / Historian

Production actuals, intervention log, model feedback loop

Learn: Production actuals → decline curve model retraining → optimization baseline refresh in Redis Flex
Decision SLA
<10 ms
Well coverage
Every producing well
Data lag
Sub-second (RDI)
Stage 2: Well Event
Well WPT-47-W shows early decline signals — optimization window is open.
A horizontal Wolfcamp A producer on a Permian Basin pad is showing simultaneous early warning signals: GOR rising, bottomhole pressure declining, and ESP current in the third consecutive anomaly reading. The production optimization engine must decide whether to adjust choke position, modify ESP frequency, or both — before the well drifts further off its target rate.
Well Event
W47
WPT-47-W
Wolfcamp A horizontal · Pad 14 · Permian Basin (Delaware) · ESP-lifted · 18-month producer · 847 BOE/day target
ACTIVE
Eventproduction_optimization_trigger
Field / PadPermian Basin — Delaware Sub-basin / Pad 14
Detected at06:22 AM local time (3rd consecutive ESP anomaly)
Current choke52% open
Current ESP freq47 Hz
BHP (latest)2,840 psi (↓4.2% in 6 hours)
GOR (latest)1,240 scf/bbl (↑18% in 6 hours)
ESP current97.3 A (3rd anomaly reading)
Why Real-Time Matters Here
BATCH OPTIMIZATION
Production optimization recommendations are typically recalculated every 4–8 minutes using historian data that is 15–30 minutes old. By the time the recommendation arrives, the well has already responded to the condition change — the window to prevent deferment has passed.
REDIS + OPTIMIZATION ENGINE
Live telemetry, completion context, and optimization features assembled before the historian's next poll cycle. The recommendation arrives while the well is still in the decision window — fast enough to act before conditions worsen.
Stage 3: Ingest
Well telemetry, completion data, and optimization features flow into Redis.
RDI continuously syncs WPT-47-W's completion records, equipment specifications, and production history from the operations database — YAML transformation pipelines, sub-second CDC lag, zero custom ETL. Kafka streams live telemetry alarms and GOR/BHP change notifications. The ESP anomaly reading from six minutes ago is already in Redis RAM when the optimization trigger fires.
Redis Data Integration (RDI)Kafka
Source Systems → Redis (Pad 14 / WPT-47-W)
PI
PI Historian / SCADA — well telemetry + alarms
Real-time pressure, flow rate, temperature, GOR, ESP current, choke position — streaming via Kafka
PG
Postgres / Operations DB — completion + equipment records
Perforation intervals, ESP nameplate, tubing design, workover history, completion date
ML
Databricks — optimization model features
Lift performance curves, decline curve outputs, GOR prediction, peer-well benchmarks
ERP
ERP / Planning — production targets + economics
AFE budgets, hedged volumes, pad production allocations, facility capacity limits
KFK
Kafka — live telemetry events + alarms
GOR change notifications, BHP alerts, ESP anomaly events, state change triggers
RDI Pipeline Status
CDC modeReal-time (Debezium)
Postgres CDC lagunder 1 sec
Telemetry event lagunder 200 ms (Kafka)
Well coverageAll producing wells on Pad 14
Deployment modelOn-premises (OT network / edge gateway)
Custom sync code0 lines (YAML only)
Why this matters for oilfield operations: Production optimization runs continuously across hundreds of wells. The value of a setpoint recommendation decays in minutes. RDI keeps the completion context and equipment history always fresh without batch export jobs — so when a telemetry trigger fires, the context is already staged.
Stage 4: Context
WPT-47-W's full operating context assembles around the optimization trigger.
Redis RAM holds the live well state — current readings, recent telemetry, in-progress alarm history. Redis Flex surfaces the completion context and 18 months of production history. Redis Search finds peer well patterns that match the current GOR/BHP signature. All three stores respond before the historian's next poll cycle.
Redis RAMRedis FlexRedis Search
Well Profile (Production 360)
Completion date18 months ago (Wolfcamp A, 4-stage frac)
Lateral length9,400 ft · 72 perforation clusters
Artificial liftESP — 540-series, 47-stage pump
Target production rate847 BOE/day (current allocation)
Last workover11 months ago (ESP replacement)
Peer well groupDL-Wolfcamp-A-Tier1 (42 wells)
Live Operating Signals
GOR trend (6h)↑18% — 1,050 → 1,240 scf/bbl
BHP delta (6h)↓4.2% — 2,960 → 2,840 psi
ESP current (3 readings)97.3A (anomaly threshold: 94A)
Choke position52% — above optimal for current BHP
Tubing head pressure342 psi (within normal range)
Peer well pattern match (Search)0.87 similarity — DL-W-A-031 declining GOR event
Context signal: Rising GOR combined with declining BHP indicates the well is loading up — gas breakthrough from the formation is beginning to outpace liquid production. The ESP current anomaly confirms the pump is working harder against the changing fluid composition. The peer-well match from Redis Search shows DL-W-A-031 recovered 94% of target production after a choke+frequency adjustment in the same GOR/BHP window. None of this context was connected before Redis.
Stage 5: Feature Serving
47 optimization features hydrated in 4.1ms.
Redis Flex holds the well's production feature archive and peer-well benchmarks. Redis Search aggregates similarity vectors across the peer well group. Redis RAM caches the hot telemetry signals. The optimization engine's 47-feature scoring vector assembles from all three stores — the same feature definitions used for model training are served here with zero drift.
Redis SearchRedis Flex
gor_trend_6h
6-hour GOR rate of change vs completion baseline
+18.1% (threshold: >12%)0.3 ms
bhp_delta_pct_6h
Bottomhole pressure percentage change over 6-hour window
-4.2% (threshold: >-3%)0.2 ms
esp_current_deviation
ESP motor current deviation from nameplate operating point
+12.4% above nameplate0.3 ms
lift_performance_index
Current lift efficiency vs optimal curve for this ESP at current BHP
0.71 (target: >0.85)0.4 ms
peer_well_pattern_similarity
Cosine similarity to peer well decline events in Redis Search library
0.87 — DL-W-A-0310.3 ms
choke_bhp_alignment_score
Current choke position vs optimal for current BHP and GOR combination
0.42 (suboptimal)0.3 ms
TOTAL FEATURES
47
P99 LATENCY
4.1 ms
OPTIMIZATION CYCLE
under 10 ms
TRAIN/SERVE PARITY
100%
Stage 6: Decision
Two setpoint adjustments ranked. Choke reduction + ESP ramp recommended in 5.9ms.
The optimization engine evaluates three operating paths — adjust choke + ESP frequency, adjust choke only, or maintain current setpoints. Each path is scored against lift performance, BHP trajectory, and economic impact. The constraint engine validates the recommended path against facility capacity and operating envelope before issuing the recommendation.
Lift Performance ModelConstraint Engine
47 optimization features evaluated
3 operating paths scored
Peer well validation: DL-W-A-031 match
Decision returned in 5.9ms
#1 Recommendation
ADJUST CHOKE + ESP
Choke 52% → 41% · ESP 47 Hz → 52 Hz
Choke reduction relieves tubing load and reduces GOR accumulation rate. ESP frequency increase compensates for declining BHP and maintains liquid production rate. Peer well DL-W-A-031 recovered to 94% of target rate within 4 hours of same adjustment.
Optimization score0.89
#2 Choke Only
ADJUST CHOKE
Choke 52% → 44% — partial correction
Choke adjustment alone partially addresses the GOR rise but does not correct the ESP operating point. Current ESP current anomaly (3 readings) indicates frequency adjustment is warranted. Partial correction scores 0.61.
Optimization score0.61
#3 Suppressed
MAINTAIN SETPOINTS
Hold current operating parameters
Constraint engine suppresses maintain-setpoints when GOR trend exceeds 12%, BHP delta exceeds -3%, AND ESP current deviation is active simultaneously. Current condition meets all three suppression criteria.
Optimization score0.11
Stage 7: Business Impact
8.1ms between detection and action.
Without real-time decisioning, production optimization runs on batch historian data — the recommendation arrives after the well has already responded to the condition change. GOR and BHP continue to move while the batch cycle completes. By the time the setpoint change deploys, the well has been producing off-target for hours. Redis closes the gap between detection and action.
Production Timeline
BATCH OPTIMIZATION PATH (WITHOUT REDIS)
06:22 AMGOR/BHP anomaly detected — queued for next optimization cycle
06:22 AM + 4.2 minHistorian data polled (T-15 min readings used)
06:26 AMOptimization model runs on stale features
06:30 AMSetpoint recommendation issued (8 min after event)
06:30 AM – 08:15 AMWell produces at 623 BOE/day (off-target)
Outcome224 BOE deferred over 2 hours = ~$15,700 lost production
REDIS + OPTIMIZATION ENGINE PATH
06:22 AMGOR/BHP anomaly detected
06:22 AM + 8.1msOptimization features assembled — setpoint recommendation issued
06:22 AM + 9msChoke and ESP targets deployed to DCS
06:26 AMWell stabilizing toward target — GOR trend reversing
Outcome0 BOE deferred · Production maintained at 847 BOE/day
The platform play: At hundreds of wells per operator, a single percentage point improvement in optimization responsiveness compounds across the portfolio. Redis is the architectural layer that makes continuous closed-loop optimization possible — not by replacing the physics models, but by ensuring they always see current data.
Per-Event Impact
224 BOE
deferred over 2 hours · batch path production loss
0 BOE
target production maintained · 8.1ms to decision
OPERATIONAL ADVANTAGE
Setpoint recommendations that arrive before conditions worsen — optimization is truly continuous, not periodic
PORTFOLIO SCALE
Multiplied across 200+ wells on a single pad cluster, even a 15-minute reduction in average optimization lag represents significant production recovery
Stage 8: Outcome
Same well. Two optimization paths.
The batch path issues the recommendation 8 minutes after the anomaly, using 15-minute-old historian data. By then the well has been producing below target for nearly an hour. The Redis path assembles live telemetry, completion context, and optimization features in 8.1ms — the setpoint change deploys before the well drifts further.
Batch Optimization (Without Redis)
BATCH OPTIMIZATION — DELAYED RESPONSE
RECOMMENDATION DELAYED
Setpoint issued 8.2 min after anomaly
Feature access (Historian p95)4,800 ms
BHP/GOR signalsT-15 min (stale at decision time)
Optimization cycleEvery 4–8 min (periodic only)
Setpoint issued8.2 min after anomaly
Production during gap623 BOE/day (off-target)
OUTCOME
DEFERRED
224 BOE deferred before correction · Well continued off-target for 2+ hours · Operator intervened manually after historian trend confirmed
224 BOE
deferred
8.2 min
to setpoint
−$15.7K
lost production
Redis + Optimization Engine
REDIS + OPTIMIZATION ENGINE
SETPOINT ISSUED — 8.1ms
8.1ms
WPT-47-W — Wolfcamp A / Pad 14
GOR/BHP Decline Detected · Setpoints Adjusted
Live signals confirmed. Choke 52% → 41%. ESP 47 Hz → 52 Hz. Recommendation deployed to DCS. Well stabilizing.
Feature access (Redis p99)4.1 ms
BHP/GOR signalsLive — sub-second lag (RDI)
Peer well validationDL-W-A-031 match at 0.87
Setpoint issued8.1 ms after anomaly
Production maintained847 BOE/day (on-target)
OUTCOME
ON TARGET
0 BOE deferred · Optimization loop closed in 8.1ms · Well recovering toward production target
0 BOE
deferred
8.1ms
to setpoint
+$15.7K
production saved
Stage 9: Architecture Recap
Every well. Every optimization window. Sub-10ms.
The architecture is designed to repeat across every well in the portfolio — not just WPT-47-W. RDI keeps completion data and equipment history always fresh. Redis RAM holds the live telemetry state. Redis Flex holds the production history and peer-well library at tiered cost. Redis Search finds the matching decline event pattern in milliseconds. The optimization engine always sees current data — and the decision loop closes before the well has time to drift.
Data Sources

PI Historian / SCADA

Real-time well telemetry — pressure, temperature, flow rate, ESP current, choke position, GOR — from field sensors and surface equipment

Operations Database

Completion records, well design, perforation intervals, artificial lift configuration — Postgres

Kafka / Event Stream

Telemetry alarms, well state change events, manual operator interventions streaming in real time

Databricks / ML Platform

Offline-trained production optimization and decline curve models — lakehouse + feature computation

ERP / Planning

Production targets, economics, hedged volumes, AFE budgets

Ingest Layer

Redis Data Integration (RDI)

CDC from Postgres operations DB — completion data, well design, equipment specs, production history — YAML pipelines, sub-second lag, 0 custom ETL

Kafka

Live telemetry alarms, well state events, GOR/BHP change notifications — streaming into Redis RAM as they occur

Redis Context · Production Operational Store

Redis RAM

Live well state — current choke, ESP frequency, BHP/THP readings, GOR signal, recent alarm history

Redis Flex

18-month production history, completion context, lift performance curves, equipment maintenance records at tiered cost

Redis Search

Similar well pattern library, optimization model output vectors, peer well benchmarks

Production Optimization Engine

Lift Performance Model

ESP and gas-lift efficiency optimization across choke/frequency/injection dimensions

Decline Curve Model

Production trend and GOR evolution prediction — Databricks-trained, Redis-served online

Constraint Engine

Facility capacity, pipeline constraints, safety limits, operating envelope enforcement

Setpoint Recommender

Ranked operating target recommendations with confidence and economic impact

Output Channels

DCS / Control System

Choke setpoint, ESP frequency target — deployed automatically or advisory to operator

Operator Dashboard

Recommendation rationale, well context, accept/override interface

Digital Twin / Historian

Production actuals, intervention log, model feedback loop

Learn: Production actuals → decline curve model retraining → optimization baseline refresh in Redis Flex
Decision SLA
<10 ms
Well coverage
Every producing well
Data lag
Sub-second (RDI)