Skip to content
Tech Interview Prep

Real Interview Questions for the Cloud Engineer at Saudi Telecom Company

New

Interview Q&A

13 questions · Flow follows Relevance until this set has a learning order.

Q&A-1What are the OSI network layers and how do they function?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

The OSI model has seven layers. Each layer does one job, passes data down to the layer below, and only talks to the layer above it. That separation is why I can debug a cloud network by asking which layer is failing instead of guessing.

LayerNameWhat it doesExamplesCloud equivalent
7ApplicationUser-facing protocols and APIsHTTP, DNS, SMTP, gRPCALB, API Gateway, application code
6PresentationEncoding, encryption, compressionTLS, JSON, protobuf, JPEGTLS termination, WAF inspection
5SessionOpens, manages and closes sessionsSIP, NetBIOS, RPC sessionsLoad balancer sticky sessions, NAT timeouts
4TransportEnd-to-end delivery, ports, reliabilityTCP, UDP, QUICSecurity groups, NACLs, ECMP
3NetworkRouting between networks, IP addressingIPv4, IPv6, ICMP, BGPVPC route tables, VPC peering, Transit Gateway
2Data LinkFrames on one link, MAC addressing, error detectionEthernet, 802.11, VLAN taggingVPC subnet, virtual NIC, VXLAN overlay
1PhysicalBits on the wire: voltage, light, radioCopper, fibre, repeaters, hubsFibre to the region, AZ interconnect

How data moves down the stack

Take a GET https://api.stc.example/orders/42 from a pod in Riyadh. The application writes HTTP. TLS encrypts it. TCP splits it into segments, adds source and destination ports, and numbers them for retransmission. IP adds source and destination addresses. Ethernet frames it for the local link. Each header is stripped and rebuilt at each hop, while the payload stays intact until the destination.

Application : GET /orders/42 HTTP/1.1
Presentation: TLS record (encrypted)
Transport   : TCP  10.20.1.14:54321 -> 10.20.4.8:443  seq=1001
Network     : IP   10.20.1.14 -> 10.20.4.8  TTL=64
Data Link   : Ethernet dst MAC = VPC gateway
Physical    : bits over fibre to the AZ fabric

At the receiver the process reverses. The NIC checks the frame, IP checks the header checksum, TCP reorders segments and requests any missing sequence numbers, TLS decrypts, and the application reads HTTP.

Why the layering matters in practice

A timeout on port 443 with a successful ping points above Layer 3. Ping proves Layer 3 reachability and Layer 2 delivery to the gateway. It says nothing about TCP, TLS, or HTTP. That is the trace I use on call:

  1. ping fails: check Layer 3 routing, route table, and whether the subnet has a route to the destination CIDR.
  2. ping works, nc -vz host 443 fails: check Layer 4. In AWS or STC Cloud this is usually a security group rule or a NACL. Security groups are stateful and filter at Layer 4. NACLs are stateless and filter at Layer 4 too, but return traffic needs an explicit rule.
  3. TCP connects, TLS handshake fails: check Layer 6. Expired certificate, wrong SNI, or a cipher mismatch. The packet capture shows a TLS alert, not a timeout.
  4. TLS works, HTTP returns 502 from the load balancer: check Layer 7. The balancer reached the target on TCP but the application did not return a valid HTTP response.

Where OSI is incomplete

OSI is a teaching model, not the implementation. TCP/IP collapses Layers 5 to 7 into one application layer and Layer 6 into TLS, which sits between TCP and HTTP in practice. QUIC breaks the old stack further by running over UDP at Layer 4 while carrying its own transport, crypto, and stream logic, which is closer to Layers 4, 5 and 6 combined. NAT also violates strict layering: it rewrites Layer 3 and Layer 4 headers to make a Layer 7 connection work, which is why stateful firewalls and NAT timeouts cause the classic "connection drops after 350 seconds idle" fault.

If an interviewer asks for a cloud-specific mapping, I would say this: Layer 1 and 2 are the provider's problem inside the VPC fabric, Layer 3 is route tables and peering, Layer 4 is security groups and load balancer listeners, and Layers 5 to 7 are the application and the services in front of it. Naming the layer first narrows the fix to one config surface instead of five.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-2Can you explain the Java Reflection API?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

Reflection is the part of the Java runtime that lets code inspect and manipulate classes it was not compiled against. You get a Class<?> object at runtime, then you can list its constructors, fields and methods, create instances, read and write fields, and invoke methods, even private ones in some cases.

I meet it in cloud services through the frameworks, not by writing it directly. Spring creates beans by calling constructors reflectively, Jackson and Hibernate populate objects by setting fields reflectively, and metrics or tracing agents read annotations and fields the same way. That is why a Java service can pick up a new DTO or a new @ConfigurationProperties class without the framework being recompiled.

What the API actually gives you

Java
// Java 21, checked against the JDK API
Class<?> clazz = Class.forName("com.stc.billing.InvoiceService");
Object svc = clazz.getDeclaredConstructor().newInstance();

Method issue = clazz.getMethod("issue", String.class); // public only
issue.invoke(svc, "INV-1042");

Field limit = clazz.getDeclaredField("dailyLimit");
limit.setAccessible(true); // may throw InaccessibleObjectException, see below
limit.setLong(svc, 50_000L);

Three entry points matter. Class.forName(name) loads a class by string, which is how config files and plugin loaders work. getMethod and getDeclaredMethod differ in a way that bites in interviews: getMethod returns public methods including inherited ones, getDeclaredMethod returns methods declared on that class including private ones. getDeclaredFields behaves the same way for fields. invoke then calls the method with boxed arguments, and any exception thrown inside the target method comes back wrapped in InvocationTargetException, so you have to unwrap it with getCause() or your error handling reports the wrapper instead of the real failure.

A typical trace for a config-driven job on Kubernetes looks like this. The pod starts, the framework scans the classpath, it finds InvoiceService, it calls getDeclaredConstructor().newInstance(), then it looks for a method annotated @Scheduled and invokes it every minute. If the class name in the ConfigMap is mistyped, the failure is ClassNotFoundException at startup, which is good, because the pod crash-loops and the bad config never reaches production traffic.

Trade-offs and where it breaks

ApproachStartup costCall costCompile-time safety
Direct callnonelowest, inlinablefull
Reflectionclass loading plus lookuphigher at first, JVM generates an accessor after about 15 callsnone, failures are runtime exceptions
MethodHandlelookup once, then reuseclose to direct after inliningnone at lookup, typed after
Code generation (annotation processing)build timedirect call costfull

Reflection trades compile-time safety for runtime flexibility. You pay with stringly typed lookups, NoSuchMethodException when a signature changes, and slower calls until the JVM inflates the accessor. Cache the Method or Field object. Calling getDeclaredMethod inside a request loop is a self-inflicted latency problem.

The failure mode I watch for on Java 17 and 21 is strong encapsulation from JPMS. Since Java 16, setAccessible(true) on a JDK internal class throws InaccessibleObjectException unless you open the package with --add-opens. Libraries that used to reflect into java.lang or JDK internals broke on upgrade for exactly this reason. The fix is to upgrade the library or add the flag explicitly, not to run with --illegal-access=permit, which no longer exists.

Two other limits matter in our environment. Reflection cannot see obfuscated or stripped names reliably, so it is a poor fit for code that gets minified or heavily transformed. And in a GraalVM native image, reflection needs explicit configuration in reflect-config.json, because there is no classpath to scan at runtime. If we ever move a service to native image for cold-start reasons, every reflective target has to be declared ahead of time.

When I would not use it

For hot paths, for anything where a typo should fail the build, and for new code where I control both sides, I prefer direct calls, MethodHandle with a cached lookup, or generated code. Reflection earns its place at framework boundaries, plugin loading, serialization, and test tooling, where the whole point is working with classes the framework author never saw. That boundary is also where I add tests that load the real class by name, because the compiler will not catch a renamed method for me.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-3What are the SOLID principles and how do you apply them in your code?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

SOLID is five design rules for keeping code changeable without rewriting it. I use them most in the automation we run around cloud provisioning at STC: Python handlers that create resources, send notifications and write audit records. The principles matter there because a change to one provider or one notification channel should not force a redeploy of the whole handler.

PrincipleRule in one lineWhere it bites in cloud code
Single ResponsibilityA class has one reason to changeProvisioning, notification and audit in one handler
Open/ClosedOpen for extension, closed for modificationAdding a new cloud provider or region
Liskov SubstitutionSubtypes must work wherever the base type is expectedA fake repository in tests replacing the real one
Interface SegregationClients should not depend on methods they do not useA Lambda that only reads config forced to implement admin methods
Dependency InversionDepend on abstractions, not concrete classesInjecting the API client so unit tests do not call the cloud

A concrete refactor

Before, one class did everything. A change to the SMS template meant touching the provisioning logic, and a unit test needed live credentials.

Python
# Python 3.12, before: one class, three reasons to change
class OrderProvisioner:
    def provision(self, order):
        vm = stc_cloud.create_vm(order)          # provisioning
        send_sms(order.customer_phone, "VM ready")  # notification
        write_audit(order.id, "provisioned")     # audit
        return vm

After, each collaborator has one job and the provisioner depends on abstractions.

Python
from typing import Protocol

class Notifier(Protocol):
    def notify(self, order) -> None: ...

class AuditLog(Protocol):
    def record(self, order_id: str, event: str) -> None: ...

class SmsNotifier:
    def notify(self, order):
        send_sms(order.customer_phone, "VM ready")

class OrderProvisioner:
    def __init__(self, cloud, notifier: Notifier, audit: AuditLog):
        self.cloud, self.notifier, self.audit = cloud, notifier, audit

    def provision(self, order):
        vm = self.cloud.create_vm(order)
        self.notifier.notify(order)
        self.audit.record(order.id, "provisioned")
        return vm

That split gives me the other four principles in practice. Open/Closed: adding email notification means writing a new Notifier and passing it in, with no edit to OrderProvisioner. Dependency Inversion: the provisioner never imports the SMS gateway, so a test passes a recording fake and runs in milliseconds with no network. Liskov Substitution: that fake must honour the same contract, so if notify raises on a missing phone number in production, the fake should raise too, or the test passes and production fails. Interface Segregation: I keep Notifier and AuditLog as separate protocols. A batch job that only provisions VMs takes only the audit dependency and is not forced to stub a notifier it never calls.

Where I push back

SOLID is not a target for every script. For a one-off Terraform helper or a 40-line Lambda that runs once a day, splitting into five protocols adds files and indirection with no second implementation to justify it. I apply the principles when I see a second provider, a second channel, or a test that needs credentials. The failure mode I watch for is abstraction ahead of need: an interface with one implementation, created because a diagram said so, that makes a simple rename a hunt across three files. My check is simple. If I cannot name the change the abstraction absorbs, I do not add it yet. When the change arrives, the seam is already in the right place because the responsibilities were separated first.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-4How do you create custom singleton and custom immutable classes?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

In Java, a singleton controls instantiation so only one instance exists per classloader, and an immutable class prevents state changing after construction. I would show both patterns, then explain where the naive versions break under concurrency, serialization and reflection.

Singleton: three versions I would actually discuss

Java
// 1. Eager, thread-safe, simple. Created on first class load.
public final class ConfigRegistry {
    private static final ConfigRegistry INSTANCE = new ConfigRegistry();
    private ConfigRegistry() {}
    public static ConfigRegistry getInstance() { return INSTANCE; }
}
Java
// 2. Lazy with double-checked locking. Needs volatile.
public final class ConfigRegistry {
    private static volatile ConfigRegistry instance;
    private ConfigRegistry() {}
    public static ConfigRegistry getInstance() {
        ConfigRegistry local = instance;
        if (local == null) {
            synchronized (ConfigRegistry.class) {
                local = instance;
                if (local == null) {
                    local = new ConfigRegistry();
                    instance = local;
                }
            }
        }
        return local;
    }
}
Java
// 3. Enum. My default for new code.
public enum ConfigRegistry {
    INSTANCE;
    public void load() {}
}

The enum version is thread-safe by the JVM, immune to reflective instantiation, and serialization returns the same constant. The double-checked version fails if you drop volatile: another thread can see a partially constructed object because the write to instance can be reordered with the constructor. Eager initialization is fine unless construction is expensive or can fail, in which case class loading throws ExceptionInInitializerError and the class is poisoned.

Two failure modes interviewers probe:

AttackEffect on classic singletonFix
---------
---------
---------
newInstance() via reflection after setAccessible(true)Second instance createdGuard constructor, or use enum
Java serialization round-tripreadObject creates a second instanceAdd readResolve() returning the singleton, or use enum
Two classloaders (common in app servers)One instance per loader, not truly globalAccept per-loader scope, or keep state in a shared service

For a cloud service I would rarely reach for a hand-rolled singleton at all. A dependency injection container or a single bean in the application context gives the same one-instance guarantee with testability. A static singleton makes unit tests order-dependent because state leaks between tests.

Immutable class

Java
public final class Endpoint {
    private final String host;
    private final int port;
    private final List<String> tags; // defensive copy in and out

    public Endpoint(String host, int port, List<String> tags) {
        this.host = Objects.requireNonNull(host);
        if (port < 1 || port > 65535) throw new IllegalArgumentException("port");
        this.port = port;
        this.tags = List.copyOf(tags); // unmodifiable copy, rejects nulls
    }
    public String host() { return host; }
    public int port() { return port; }
    public List<String> tags() { return tags; }
}

Rules that make it hold: final class so no subclass can add mutable state, private final fields, no setters, and defensive copies for any mutable argument or return value. List.copyOf matters here. Returning the internal list would let a caller mutate the object after construction, which silently breaks hash codes if the object is used as a map key.

Since Java 16, a record gives you most of this in one line:

Java
public record Endpoint(String host, int port, List<String> tags) {
    public Endpoint { tags = List.copyOf(tags); }
}

A record is only shallowly immutable. If a component is itself mutable, the record still shares that mutable object, so the same defensive-copy discipline applies to nested types.

Trace for the defensive copy: caller passes tags = [a], constructor stores a copy, caller then adds b to their list, endpoint.tags() still returns [a]. Without the copy, the endpoint would change under a thread already reading it, and any HashMap keyed by it would lose the entry.

How I would close in the interview

Singleton answers the question "how many instances?" Immutable answers "can this instance change?" In production code I prefer an enum singleton or a container-managed bean for the first, and a record or final class with copied collections for the second, because both survive the concurrency and serialization cases that break the textbook versions.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-5What is your experience with IMS (IP Multimedia Subsystem) and Diameter Signaling?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

My IMS experience is as a cloud platform engineer running the signalling core, not as a handset or media engineer. I deployed and operated P-CSCF, I-CSCF and S-CSCF, TAS, and the HSS/UDM tier on Kubernetes, with Diameter between them and to charging and policy systems. The cloud problem is specific: IMS is stateful and latency sensitive, so horizontal scaling works for P-CSCF, but S-CSCF and HSS have to be sized for the registered base and tested for peer failover, not just pod restarts.

The flow is standard 3GPP. The UE registers through P-CSCF. I-CSCF asks the HSS where the subscriber should be served. S-CSCF holds the registration and routes SIP to TAS for voice and SMS. Diameter carries the control data: Cx between CSCF and HSS, Dx via the SLF to the right HSS shard, Gy to the OCS for online charging, Rx from P-CSCF to PCRF/PCF for QoS, and Sh from TAS to HSS for application data.

UE --SIP REGISTER--> P-CSCF --> I-CSCF --Diameter Cx--> HSS/UDM
                                  |                         ^
                                  +--Diameter Cx--> S-CSCF --+
                                                     --SIP--> TAS
P-CSCF --Diameter Rx--> PCRF/PCF
IMS charging function --Diameter Gy--> OCS

Where Diameter shows up in a registration

LIR/LIA is I-CSCF to HSS. It returns the assigned S-CSCF. UAR/UAA is S-CSCF to HSS. It returns the authentication data for that subscriber.

I-CSCF -> HSS   LIR { User-Name: imsi-..., Visited-Network-Identifier }
HSS -> I-CSCF   LIA { Result-Code: 2001, Server-Name: scscf... }
S-CSCF -> HSS   UAR { User-Name: imsi-... }
HSS -> S-CSCF   UAA { Result-Code: 2001, User-Authorization }

Result-Code 2001 is DIAMETER_SUCCESS. The codes I alert on are 3002 DIAMETER_UNABLE_TO_DELIVER, 3004 DIAMETER_TOO_BUSY, 5001 DIAMETER_AVP_UNSUPPORTED, and 5005 DIAMETER_MISSING_AVP. A rise in 3004 from one peer means that peer is overloaded. Adding CSCF pods does not fix it. Shedding load and failing over to the alternate Diameter peer does.

InterfacePeersCarriesFailure I watch for
CxI/S-CSCF to HSS/UDMRegistration, authentication, locationHSS latency inflates every SIP REGISTER
DxI/S-CSCF to SLF to HSSRouting to the correct HSS shardWrong shard, repeated LIR failures
GyIMS charging function to OCSOnline chargingOCS outage, see below
RxP-CSCF to PCRF/PCFQoS for media flowsMedia left on a best-effort bearer
ShTAS to HSSCall forwarding and other application dataStale data, wrong supplementary service routing

Sizing and the Gy decision

I size from busy-hour registrations, not daily averages. For 2 million subscribers, if 5 percent register in the busy hour, that is 100,000 registrations an hour, about 28 per second on average and roughly 100 per second at peak. With several Diameter transactions per registration plus charging traffic, I plan HSS headroom for 300 to 400 Diameter transactions per second at peak. That sets pod counts, SCTP associations on port 3868, and connection limits before load testing.

Gy forces a real trade-off when the OCS is down. Fail-closed blocks new sessions. It protects revenue and makes the outage visible, but a charging fault becomes a voice outage, including for emergency calls if the implementation is careless. Fail-open lets calls continue and queues CDRs for later rating. It protects service, but if the outage lasts hours you accumulate unrated usage and revenue leakage, and you may breach credit limits for prepaid subscribers.

The decision I use is hybrid, with a threshold. Fail open with a local quota, for example a fixed credit or time allowance per subscriber, and fail closed once that quota is exhausted. That keeps service up for a short OCS outage, bounds the leakage to quota times active subscribers, and gives finance a number to reconcile. The threshold is set with commercial and regulatory input, not by engineering alone, because the same setting that looks safe for postpaid voice is wrong for prepaid data.

Two other failures recur in cloud deployments. A Diameter peer flaps, CER/CEA drops, and DWR/DWA timeouts are the first sign, so I alert on peer state, not pod health. SCTP multihoming breaks across cloud networks, so the secondary path never takes over. I test both by withdrawing a peer and a route in staging. If failover takes more than a few seconds, SIP retransmits turn a single peer loss into a signalling storm.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-6How would you compare a binary tree versus a linked list in terms of time and space complexity?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

A linked list is a sequence. A binary tree, specifically a binary search tree, is a sequence plus an ordering rule. That one difference drives every complexity number.

For n elements, a linked list stores each element once with one next pointer. Space is O(n). Search is O(n) because you walk from the head. Insert at the head is O(1). Insert at the tail is O(n) unless you keep a tail pointer, then O(1). Delete is O(1) if you already hold the node, O(n) if you must find it first.

A binary search tree stores each element once with up to two child pointers. Space is also O(n), but with a larger constant: two pointers per node instead of one, plus the node overhead. Search, insert and delete are O(log n) on average when the tree stays balanced, because each comparison discards roughly half the remaining keys. Worst case is O(n) when the tree degenerates into a chain.

In a cloud control plane this matters for in-memory indexes. If I keep 1 million config keys or routing entries in a process and look them up by key on every request, a linked list scan is up to 1 million comparisons per lookup. A balanced tree is about 20 comparisons, log2(1,000,000) is roughly 20. That is the difference between a lookup that fits in microseconds and one that saturates a CPU under load.

OperationLinked listBalanced binary search treeDegenerate tree
Search by keyO(n)O(log n)O(n)
Insert at head / root pathO(1) at headO(log n)O(n)
Insert at tailO(n), O(1) with tail pointerO(log n)O(n)
Delete known nodeO(1)O(log n)O(n)
Delete by keyO(n) to find, O(1) to unlinkO(log n)O(n)
Space per element1 pointer2 pointers2 pointers
Iteration in orderO(n), insertion orderO(n), sorted orderO(n), sorted order
Cache behaviourPoor, nodes scattered in memoryPoor, same problem, plus pointer chasing down levelsPoor

Why the tree wins on search and loses on simplicity

The linked list has no ordering invariant to maintain. You cannot break it by inserting keys in a bad order. The tree only gives O(log n) if you enforce balance or accept average case behaviour. A plain, unbalanced binary search tree inserted with sorted keys becomes a linked list in disguise.

Trace with keys inserted in order 10, 20, 30, 40:

10
  \
   20
     \
      30
        \
         40

Searching for 40 now visits 4 nodes, not 2. With 1 million sorted inserts, height is 1 million, search is O(n), and recursive insert or traversal will overflow the stack. That is a concrete failure mode I have seen in interview code and in production code that assumed "tree means log n" without checking balance.

Python sketch, checked against CPython 3.12 semantics:

Python
class ListNode:
    def __init__(self, key):
        self.key = key
        self.next = None

class TreeNode:
    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None

def list_search(head, key):
    cur = head
    while cur:
        if cur.key == key:
            return cur
        cur = cur.next
    return None  # O(n) worst case

def tree_search(node, key):
    while node:
        if key == node.key:
            return node
        node = node.left if key < node.key else node.right
    return None  # O(height), log n if balanced

The loop version of tree search avoids recursion depth issues. Recursive versions are cleaner to write and risk a stack overflow on a degenerate tree.

When I would not pick either

For a Cloud Engineer at STC, the practical choice is rarely a hand-rolled tree or list for a large index. A hash table gives O(1) average search with O(n) space and is what most config stores, caches and routing tables use. A balanced tree such as a red-black tree or B-tree is chosen when I need sorted iteration, range queries or ordered scans, for example listing keys between two values or merging sorted streams. A linked list is chosen when the access pattern is sequential and inserts are mostly at the head, such as a free list or a simple queue buffer, and I do not need search by key at all.

Both structures also lose to arrays on cache locality. Pointer chasing jumps around memory, so even an O(log n) tree search can be slower in wall-clock time than a binary search over a sorted array for moderate n. If the data fits in memory and rarely changes, a sorted array with O(log n) search and O(n) insert is often the better engineering trade-off.

So the comparison to state in an interview: same O(n) space class, tree pays double pointers for ordering, list pays O(n) search for simplicity, and the tree's O(log n) claim only holds while balance holds.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-7How would you approach an optimization problem based on your past project experiences?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

I start by pinning down what "optimized" means in numbers before touching anything. In my last platform role that was a Kubernetes cost and latency problem for a customer-facing API: p99 was 410 ms at peak and we were paying for 1,150 vCPU of mostly idle capacity. I defined success as p99 under 200 ms at 2x peak traffic, and a 30% cut in monthly compute spend, with no change to the error budget. If you skip that step you end up tuning a query that was never the bottleneck.

Then I measure, find the constraint, change one variable, and re-measure under load that resembles production. That loop is the whole approach, and the rest is knowing which constraint you are looking at.

A concrete example

We had a stateless order API on EKS-style clusters in a Saudi region, fronted by an ALB, with a managed PostgreSQL instance. Traffic was spiky: normal weekdays at 800 requests per minute, Ramadan evenings at 3,200. The first trace told the story.

SignalBeforeWhat it pointed to
p99 latency410 msqueueing, not CPU
Pod CPU utilisation (p95)18%over-provisioned requests
HPA replicas at peak46 of 60scaling too late
DB connections480, pool saturatedconnection churn per pod
Monthly compute costSAR 96,000 (hypothetical project figures)waste plus cold starts

CPU was low while latency was high, so adding bigger nodes would have made the bill worse and fixed nothing. The queue was at the database pool and at pod startup. Each pod opened its own pool, 46 pods times 10 connections each, and new pods took 35 to 50 seconds to become ready because the image pull and JVM warm-up happened after the readiness probe started passing traffic too early.

I changed three things, in order, and measured after each:

  1. Right-sized requests and set HPA on a custom metric. Requests dropped from 2 vCPU to 750 mCPU per pod based on p95 usage plus 40% headroom, and HPA scaled on requests per pod (target 120) instead of CPU alone, so it reacted to queueing.
  2. Put PgBouncer in transaction mode in front of PostgreSQL and capped server connections at 100. That cut connection churn and let the database use its buffer cache instead of thrashing.
  3. Fixed readiness: a startup probe with a 60 second window, and pre-pulling the image on new nodes via a DaemonSet cache. Cold start fell to about 8 seconds.

The HPA and probe change I kept in Terraform so it was reviewable:

YAML
resources:
  requests: { cpu: "750m", memory: "1Gi" }
  limits:   { cpu: "1500m", memory: "2Gi" }
# HPA: scale on requests per pod, min 8, max 60, stabilisation 60s
# startupProbe: periodSeconds 5, failureThreshold 12 (60s window)

Result, measured the same way

SignalAfterChange
p99 latency at 3,200 rpm165 ms-60%
Average replicas at peak28fewer, warmer pods
DB server connections95pool no longer saturated
Monthly compute costSAR 61,000-36%
Error rate during scale-out0.02%within budget

Arithmetic check: 1,150 vCPU provisioned at 18% utilisation is roughly 940 vCPU idle. At our internal rate that idle capacity was most of the SAR 35,000 saving, the rest came from fewer cold starts during the evening spike.

What I watch for now

Optimisation fails in predictable ways. Scaling on CPU alone misses queueing, which is why I use requests per pod and latency as secondary signals. Cutting requests too aggressively causes throttling and p99 spikes that averages hide, so I check p95 and p99 per pod, not cluster averages. And in a telecom environment with data residency obligations under Saudi PDPL, I keep the data plane in-Kingdom and validate that a cost optimisation, like moving to a cheaper region, does not move customer data out of scope. I also load test at 2x the Ramadan peak before calling it done, because a fix that works at weekday traffic and falls over at peak is not a fix.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-8Can you design a solution for handling asynchronous requests to charge user accounts?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

I would not charge inside the HTTP request. I would accept the request, persist it, return 202 Accepted with a charge ID, and let workers do the debit against the billing system. That gives the caller a durable handle to poll, and it survives a pod restart, a queue redelivery, or a billing API timeout without double charging.

The flow I would draw:

Client -> API (POST /charges) -> Postgres: charges + outbox
                              -> 202 {charge_id, status: queued}
Postgres outbox -> relay -> Kafka topic: billing.charge.requested
Kafka -> charging worker -> rating/balance check -> billing ledger API
Worker -> Postgres: status = settled | failed | needs_review
Client -> GET /charges/{id}  (poll or webhook)

Three decisions make or break this: idempotency on the way in, exactly-once effect on the way out, and reconciliation when the ledger and my database disagree.

Accept and persist

POST /charges requires an Idempotency-Key from the caller, for example the order ID or CDR ID from the upstream service. The API inserts one row in a transaction:

SQL
INSERT INTO charges (charge_id, idempotency_key, account_id, amount_halalas, currency, status)
VALUES ('chg_9f21', 'order_8841', '9665xxxxxxx', 2500, 'SAR', 'queued')
ON CONFLICT (idempotency_key) DO NOTHING
RETURNING charge_id;

If the key already exists, I return the existing charge_id and its current status instead of creating a second charge. Amounts stay in minor units, halalas here, so I never pass floats to billing. The same transaction writes an outbox row. A relay publishes that row to Kafka and marks it sent. If the API crashes after the insert but before publishing, the outbox row is still there and the relay picks it up on restart. If it crashes after publishing but before marking sent, Kafka gets a duplicate, which the worker must tolerate.

Work the queue

Workers consume billing.charge.requested in account order where ordering matters. For prepaid mobile accounts, two charges for the same MSISDN must not race on the balance. I partition Kafka by account_id, so one account's charges are handled sequentially by one partition, while different accounts scale across workers. A worker then calls the rating and ledger service with the same idempotency key, order_8841, so a retry on that side also collapses to one debit.

Status transitions I would enforce in the database, not in worker memory:

StatusMeaningNext step
queuedAccepted, not yet picked upWorker claims it
processingWorker holds the claimLease expires after 60 s if worker dies
settledLedger confirmed the debitEmit charge.settled event
failedPermanent rejection, e.g. insufficient balance, invalid accountReturn reason to caller
needs_reviewLedger outcome unknown after timeoutReconcile, never auto-retry blindly

The claim uses a lease. A worker updates queued -> processing with claimed_by and lease_until. If it dies mid-call, another worker reclaims the row after the lease expires. That handles the common failure: the billing API actually debited the account, but the response was lost. The worker cannot know, so it moves the charge to needs_review and a reconciler queries the ledger by idempotency key. Only when the ledger confirms no debit exists does it retry. That is the difference between at-least-once delivery, which queues give you, and exactly-once effect, which the ledger key gives you.

Worked trace

Hypothetical figures, labelled as such: 2,000 charge requests per minute at peak, average debit 25 SAR, worker p99 ledger call 180 ms.

  1. Client sends POST /charges with Idempotency-Key: order_8841, amount 2500 halalas. API inserts chg_9f21, returns 202 in about 40 ms.
  2. Relay publishes to Kafka within a second. Worker W3 claims it, calls the ledger.
  3. Ledger times out at 2 s. W3 does not retry immediately. It sets needs_review and releases the claim.
  4. Reconciler asks the ledger for order_8841. Ledger returns debit txn_5512, 2500 halalas. Reconciler sets settled, emits the event, and the webhook fires.
  5. Client retries the original POST during step 3. It gets the same chg_9f21 back with status needs_review, not a second debit.

Capacity check: at 2,000 per minute and 180 ms per call, I need roughly 6 concurrent ledger calls on average, so I would run 20 workers and cap per-worker concurrency, then watch queue lag. If lag grows past 30 s, the bottleneck is the ledger, and adding API pods does nothing.

Failure modes I would name in the loop

Poison messages, for example a negative amount that fails validation, go to a dead-letter topic after 5 attempts with the error attached, so one bad record does not block the partition. A ledger outage fills the queue, so I set a retention of 7 days on the topic and alert on lag and on the age of the oldest queued charge, not just on error rate. For the caller, GET /charges/{id} returns the status and, on failure, a stable code such as insufficient_balance or account_not_found, plus a webhook signed with a shared secret for callers that do not want to poll. For STC specifically I would also keep the audit trail immutable: every status change writes an append-only row with actor, timestamp, and ledger transaction ID, because a disputed charge on a prepaid account is investigated weeks later and the queue alone will not answer it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-9Why do you want to join Saudi Telecom Company?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

I want to join STC because the cloud problems here are constrained in ways that change the engineering. Data residency, NCA controls and PDPL are not paperwork after the design. They decide where a workload can run, which identity provider can issue a token, and whether a backup taken in Riyadh can be restored from another region. I have worked under residency rules before, on a private Kubernetes platform of about 40 nodes, and I want to do that work at the scale of a national operator where a bad change affects billing, provisioning and customer APIs at once.

I weighed three options. A hyperscaler role would give me deeper managed services and faster tooling, but less ownership of the sovereign constraints. A consultancy role would give me variety, but I would hand over the system and not live with the pager. STC gives me the opposite trade. Slower procurement, stricter change control, and a platform I have to run for years. That is the trade I prefer, because it forces me to prove restores and cost, not just ship a design.

What I would check before I accepted

CriterionWhat I need to seeWhy it matters
ScopeOwnership of a platform or service, not only ticket executionWithout ownership I cannot fix the gaps I find
Change controlA path to automate a repeatable manual step within 90 daysIf every change needs a manual ticket, automation work dies
On-callA named service, a runbook and a backup restore drill in the last quarterAn untested restore is a failure I would inherit on day one

If the role turned out to be only provisioning VMs to a ticket queue, with no say over architecture or recovery, I would decline. That is not a fit for the engineer I am trying to become, and it would not be fair to the team either.

What could go wrong, and how I would catch it

The first risk is assuming STC cloud work is the same as a private cloud with a different logo. The approval chain is longer, documentation may be in Arabic as well as English, and a design that is fine technically can fail an audit if the data flow is not drawn correctly. In my first month I would map one service end to end, traffic, identity, storage, backups and alerts, and have the service owner check it. That map is cheap and it exposes the assumptions I brought from my last job.

The second risk is in the move itself. I would be new to the incident culture and to the people who know where the bodies are buried. The failure mode is a confident newcomer who changes a pipeline in week two and breaks a deployment nobody documented. My guardrail is simple. No production change in the first 30 days without a paired engineer who owns the service, and every alert I touch gets a named owner before I close it.

The third risk is cost drift. At my current role our cloud bill rose 40 percent in one quarter after a migration, not because traffic grew, but because idle volumes and a test cluster were left running. I would baseline cost per workload in the first 60 days, with figures labelled by source, so a later increase is visible in a week rather than discovered in a quarterly review.

That is why STC. The constraints are harder, the feedback is slower, and the work stays with me. I would rather be measured on a restore drill and a latency graph here than on a slide deck elsewhere.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-10How do you manage a project, and what are the main reasons you believe a project might fail?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

I manage a project by fixing scope, dates and owners in writing before any cloud work starts, then tracking delivery against those commitments weekly. For a typical STC cloud migration, that means a charter with three things: the in-scope workloads and regions, the exit criteria for each phase, and a named owner for every dependency outside my team, such as network, security and the data centre. I break the work into phases that each end in a testable state, for example landing zone ready, pilot workload migrated, then bulk migration. I review progress against milestones, not effort spent, and I raise risks as soon as the forecast date moves.

The main reasons projects fail, in my experience, are unclear scope, hidden dependencies, and late decisions. I design for those three specifically.

How I run it in practice

I start with a one-page plan that fits on a wall: scope, milestones with dates, budget, RACI, and a RAID log for risks, assumptions, issues and dependencies. For STC work I add two local constraints early. Data classification and residency under Saudi PDPL and NCA Essential Cybersecurity Controls affect where workloads can run and what telemetry I can send offshore, so the security review is a milestone, not a final gate. Telecom dependencies are also concrete: a migration that looks like a compute task often waits on MPLS bandwidth, number portability windows, or a change freeze around peak events such as Hajj.

Each phase has an entry checklist and an exit test. A landing zone phase, for instance, exits only when a test VPC in the target region passes connectivity, IAM policy tests, and backup restore. That stops the common pattern where infrastructure is declared done and the application team discovers networking a month later.

I track with a simple weekly trace. Suppose a 12-week migration has 40 workloads. After week 6 I should have 20 migrated and verified. If I have 14, the burndown is 6 behind. At the observed rate of 2.3 workloads per week, the remaining 26 need 11.3 weeks, so the forecast finish is week 17, not week 12. I escalate at that point with options: add a second migration wave, defer low-priority workloads, or accept a later date. Waiting until week 10 to report the same arithmetic is how a slip becomes a failure.

Failure modeEarly signal I watchWhat I do about it
Scope creepChange requests exceed 10% of baseline scope in a monthFreeze baseline, price each change in weeks and cost, get sponsor sign-off
Hidden dependencyA milestone owner is "TBD" or a dependency has no dateName an owner and date in the RAID log, escalate if unanswered for 5 working days
Late security or compliance reviewArchitecture review scheduled after build startsPut NCA and PDPL review as a phase gate before production data moves
Underestimated migration effortPilot takes 3x the estimate per workloadRe-estimate from pilot data, cut or defer workloads before committing the full wave
Single point of knowledgeOnly one engineer can run the cutoverPair on cutover, document runbook, rehearse rollback
No rollback planCutover plan lists forward steps onlyRequire a tested rollback step and a decision time, for example abort by 02:00 if error rate exceeds 1%

Failure modes I have seen and how I detect them

The most expensive one is a dependency that nobody owned. On a network migration, the cloud team finished on time but could not cut over because a firewall rule change needed a separate change window. The signal was there in week 2: the dependency had no owner. My rule now is that a milestone with an unowned dependency is red from day one, regardless of my own team's progress.

The second is testing only the happy path. A pilot migration succeeded in a test window with low traffic, then failed under production load because session storage had not been moved. I now require the exit test to include a load or soak element proportionate to the workload, and I record the result in the phase sign-off.

The third is reporting green until the end. I report forecast dates, not just percent complete. If the forecast moves by more than a week, the sponsor hears it that week, with the cause and the options. That habit alone prevents most surprises.

If an interviewer pushes me, I would add that tools matter less than this discipline. Jira, MS Project or a spreadsheet can all work. What fails is a plan that nobody updates, risks that are logged but never acted on, and decisions that wait for consensus while the critical path burns. My job as the project lead is to make those visible early enough to fix.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-11What are your professional strengths and weaknesses?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

My main strength is keeping production changes boring. I work mostly with Terraform and Kubernetes, and I try to make every prod change reviewable and reversible. That means state in a remote backend with locking, a plan posted on the pull request, and no manual console edits. If something breaks at 2 a.m., I want the rollback to be a revert of a known change, not a guess about what someone clicked.

The second strength is incident triage. I start with the timeline and the customer impact, then look at saturation before I look at errors. A lot of outages I have seen were not code bugs. They were a pool, a quota, or a certificate that ran out. I write runbooks for those cases while I am calm, because I will not remember the exact checks when I am paged.

To make that concrete, here is a hypothetical trace I use when I talk about it. Say p99 latency climbs, the proxy shows connections at its limit, and the database itself is still idle. That pattern points to the proxy limit, not the database. The fix is to raise the limit only after checking the database ceiling, or to shed non-critical traffic first. If I raised the limit blindly and the database was already near CPU saturation, I would turn a slow service into a down service. The detection matters as much as the fix, so I alert on utilisation at 70 percent, not on the first 503.

My weakness is that I tend to design for the scale I imagine, not the scale I have. I do that for a few reasons. I am more comfortable with a general platform than with a one-off script, and when requirements are vague it feels safer to build in flexibility. It also looks like good engineering in a design review. The cost is real though. I once spent weeks on a logging design with streaming and indexing for a team that needed searchable logs for 30 days and an export for audit. The simpler managed option would have met both needs. I built the heavier version because I was solving a future problem nobody had asked for.

I have changed how I start now. Before I design, I write down three numbers: expected traffic, how long data must be kept, and who actually reads the output. If I cannot get those numbers, I say so in the first meeting. Then I pick the smallest design that passes them and I timebox any spike to half a day. I also write the decision in the pull request, including what I chose not to build.

That smallest design is not always right. If the data model will be hard to migrate later, or if retention is set by regulation and cannot be changed cheaply, building a little extra structure up front is cheaper. The same applies when a managed service has a hard limit we are close to, like query limits or regional availability. In those cases I prefer to pay the complexity early. Where migration is easy, for example swapping log storage or adding a cache in front of a read path, I keep it simple and accept that we may replace it.

I am also still improving how I write updates during incidents. I used to send long technical notes that service owners had to decode. Now I put impact and the time of the next update at the top, and keep the detail below. It is a small change, but it reduces the number of follow-up calls and gives people a clear point to plan around.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-12Where do you see yourself in five years?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second answer

"In five years I want to be operating at senior cloud engineer level at STC, with ownership of a platform area rather than single deployments. In year one I would finish CKA and Terraform Associate, and take a service from Terraform module through CI/CD, observability and on-call. In years two and three I want to lead a migration workstream, for example moving a workload into our Saudi regions while meeting PDPL and NCA controls, with a tested rollback. By year five I want to be doing design reviews for other teams, mentoring juniors, and accountable for reliability and unit cost on the services I own. I am aiming for the individual contributor track first. I will only move toward people management if I have already delivered at senior IC level and the team needs that."

That gives the panel three things to test. Staying power, because the plan is built around STC work. Level, because senior means design ownership and incident accountability, not more tickets. And judgement, because I named a track and a condition for changing it.

The choice I would explain if they push

There are two credible trajectories from a mid-level cloud engineer, and they lead to different daily work.

Deep IC trackManagement track
Year 5 scopeOwns architecture for a platform, reviews designs, leads major incidentsOwns team delivery, hiring, priorities, stakeholder negotiation
What it rewardsTechnical depth, calm under production pressure, writing clear design docsPlanning, coaching, resolving conflicts, managing up
Risk if chosen too earlyCan stall if the org has few senior IC slotsCan stall if the person lacks the IC depth to judge technical trade-offs
Signal I would look forSTC promotes senior ICs who lead migrations and cut MTTRThe team is growing and needs a lead who already has that record

My criteria for choosing are practical. First, where is my evidence strongest today. I have production Kubernetes and Terraform experience, so IC is the honest next step. Second, where does STC have a gap. A telecom cloud with sovereign data requirements needs senior ICs who can make residency and cost decisions without escalating every call. Third, what do I actually enjoy in on-call. I enjoy tracing a p99 regression to a saturated connection pool at 2 a.m. and fixing the root cause. That points to IC. I would revisit management at year four, based on whether I have mentored successfully and whether a lead role is open, rather than deciding now to please the panel.

How that plan can go wrong

A five year plan fails in predictable ways, and I would watch for them in myself.

One failure mode is certificate collecting without production ownership. I would detect it if my Terraform modules pass a course but have never survived a state lock conflict, a failed apply, or a rollback in production. The cost is a promotion case built on exams, and a team that cannot trust my designs during an incident.

A second failure mode is over-specialising in one vendor console. If in year two I can only operate one cloud's click-through workflows and cannot explain networking, IAM and cost in vendor-neutral terms, I am fragile when STC changes providers or regions. I would detect it by doing a design exercise in a second environment each year and by keeping infrastructure in code that I can read without the console.

A third failure mode is chasing management to look ambitious. If I start managing priorities before I have led a migration and owned an SLO, I will make delivery decisions I cannot defend technically. The cost shows up as missed cutovers and a team that escalates around me. My guardrail is simple. No management title until I have two years of senior IC evidence, including a postmortem where my design decision was tested.

The follow-up I expect

The separating question is usually, "What if there is no senior opening in two years?" A weak answer is either threatening to leave or saying they will wait indefinitely. A strong answer names a review point. I would say I would ask my manager at the year two review what evidence is missing, take the next migration or on-call lead role that closes that gap, and reassess at year three. If after that the work I want does not exist here, that is information I would act on then, not a threat now. That keeps the five year answer as a working plan with checkpoints, which is what a senior engineer would actually run.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-13Talk about yourself and your professional journey?

Reported in Saudi Telecom Company Software Engineer Interview Questions 2026

The 90-second version I would give

I started in network operations, moved into cloud engineering, and for the last six years I have built and run production platforms for telecom scale workloads. I took that route on purpose. I wanted to understand a failure from the packet up before I was responsible for the platform that sat on top of it.

My first three years were in NOC and infrastructure support. I worked on IP/MPLS links, load balancers, and incident triage for services where a 20 minute outage meant a regulatory report, not just a dashboard turning red. I learned to read a trace, check BGP state, and ask what the customer actually lost before I touched a config. That habit stuck. When I later saw a slow API, my first question was whether the network path, the node, or the application was the bottleneck, in that order.

I moved to a cloud team supporting a billing and provisioning platform because the work I was doing in NOC kept hitting the same ceiling. We were on VMs with manual patching and deployments that took a full day. Every change needed a maintenance window and a manual rollback plan. I could fix incidents, but I could not make the system easier to change. That is why I pushed for infrastructure as code and containers, even though it meant learning a new stack while still on call.

In my current role I run a small platform team. We own the landing zone, CI/CD, and observability for about 40 services. Last year we cut median deployment time from 3.5 hours to 22 minutes, cut change related incidents by 38 percent, and brought p99 API latency on the provisioning service from 410 ms to 160 ms. I still own the on-call runbooks, so I still get paged and I still write the postmortems.

I am applying to STC because I want that scale and that discipline applied to 5G, IoT, and enterprise cloud services, where availability and data residency are not optional features.

Timeline I keep in my head while I talk

PeriodRoleWhat I actually shipped
Years 1 to 3Network operationsBGP and load balancer incidents, automation of config checks with Python and Ansible
Years 3 to 5Cloud engineerTerraform modules for VPC, IAM, and EKS, first Kubernetes migration, GitLab CI pipelines
Years 5 to 6Senior cloud engineerPlatform team lead, cost and latency work, disaster recovery drills across two regions

Decisions I made, and what I traded away

When we moved to Kubernetes I chose managed EKS over self managed clusters. Self managed would have given us control over the control plane and the exact Kubernetes version, but it would also have meant owning etcd backups, upgrades, and certificate rotation with a team of four. We had no spare capacity for that toil, and a missed upgrade is a security risk. Managed EKS cost more per cluster and locked us to AWS upgrade cadence. I accepted that cost because it bought us time to fix application problems instead of cluster problems.

For the latency work, I chose Redis over querying the database more often. The database was already tuned and adding a read replica would have helped reads but not the hot key pattern we had, where 200 accounts generated most of the provisioning calls. Redis added a cache invalidation problem and a new failure mode if the cache went down. We handled that by treating Redis as disposable, setting a 60 second TTL, and letting the API fall back to the database with a circuit breaker. The trade was worth it. p99 fell from 410 ms to 160 ms, and database CPU dropped from 78 percent to 41 percent at peak.

I also split Terraform state by environment instead of keeping one state file. One state is simpler to reason about, but a bad apply in production could touch staging resources and the blast radius was too large for a billing system. Separate state meant more modules to maintain and slower cross environment changes. I chose the slower, safer option because our change window was already tight.

A failure I found, and how we detected it

The disaster recovery drill is the example I use most. We had a documented failover that had never been tested end to end. I ran it on a Saturday with traffic mirroring and synthetic checks every 30 seconds against the critical provisioning endpoint.

The drill exposed two problems. First, our DNS TTL was 3600 seconds, so clients kept hitting the old region for up to an hour after we switched. We detected it because the synthetic check from an external probe still resolved to the old IP while our internal health check passed. Second, database promotion took 31 minutes because a manual step in the runbook required an approval that no one was available to give at 2 a.m. The total recovery time would have been 47 minutes, which breached our 15 minute RTO and would have triggered SLA credits and a customer notification.

We fixed both. We lowered the TTL to 60 seconds for critical records, automated the promotion step with a pre approved break glass account, and added an alert if synthetic checks fail for more than two minutes during a failover. The next drill recovered the critical service in 11 minutes. That is the kind of work I want to keep doing.

Where I am still growing

I am stronger on AWS and Kubernetes than on Azure, and I have not owned a large on prem to cloud migration for a regulated telecom core system. I have done the landing zone and the pilot, and I know the questions to ask about data classification and residency, but I would need mentoring from engineers who have run that migration at STC scale. I say that plainly because I would rather be clear about a gap than hide it in an interview.

Curated: · Written: · Reviewed:

Difficulty: Easy

Curated: · Written: · Reviewed: