Quick revision
The short answer
Decide where TLS ends from security needs, not habit: whether traffic must be encrypted end to end, whether services must authenticate each other with mTLS, and what compliance requires. A service mesh can provide mTLS between services without application changes; SSL bundles fit where the application itself must terminate TLS or call others with client certificates. In every case, certificate issuing and rotation are automated, and the choice is documented and applied consistently.
What to remember
In this answer, we saw that choosing where TLS ends is choosing where traffic is readable. We decide from security needs, end-to-end encryption, service identity and compliance, then use the edge for public traffic, a mesh for mTLS between services without application changes, and SSL bundles where the application must terminate TLS or present client certificates. Certificate issuing and rotation are automated everywhere, and the choice is documented and applied consistently.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Decide where TLS ends from security needs, not habit: whether traffic must be encrypted end to end, whether services must authenticate each other with mTLS, and what compliance requires. A service mesh can provide mTLS between services without application changes; SSL bundles fit where the application itself must terminate TLS or call others with client certificates. In every case, certificate issuing and rotation are automated, and the choice is documented and applied consistently.
Why this question is asked
When each team decided on its own where TLS ends, an organisation usually ends up with three patterns at once: some services trust the load balancer and speak plain HTTP inside, some sit in a mesh, and some manage their own certificates. Each pattern can be secure, but the mixture is hard to audit and easy to get wrong at the boundaries. Interviewers ask this to see whether we can turn security requirements into a standard that teams can actually follow. In this answer, we will recap what terminating TLS means at each place, list the requirements that decide the choice, compare the options, set a standard and see where SSL bundles fit.
1A Quick Recap of TLS Termination
Terminating TLS means decrypting it. Wherever TLS is terminated, the traffic becomes readable, and from there to the next hop it is either plain HTTP or a new TLS connection. So the question where to terminate is really the question where traffic is readable, and who can see it there.
At the load balancer, the public certificate lives in one place and the load balancer can inspect, route and protect traffic, but traffic from the load balancer to the pods is plain unless we re-encrypt. In a service mesh, a sidecar or node proxy next to each service terminates and re-establishes TLS for every hop, usually as mTLS, mutual TLS, where both sides present certificates and prove who they are. In the application, the Java process itself holds the key, so the traffic is encrypted all the way into the JVM.
- Client on the internetalways TLS to our edge
- Load balancer or ingresspublic certificate, WAF, routing
- Mesh proxy next to each podmTLS between services, automatic rotation
- Application JVMSSL bundle, its own certificate
- Downstream systemsdatabase, partner APIs, often their own TLS
5 layers, from the top down. Step through them one at a time.
Wherever TLS ends, the traffic becomes readable from there to the next hop.
2The Requirements That Decide
Three questions drive the choice. First, must traffic be encrypted end to end, including inside the cluster? Many compliance regimes, such as PCI DSS for card data, and many internal security policies now say yes, because an attacker inside the network should not be able to read traffic between services. Second, must services prove their identity to each other? If the orders service should only accept calls from the checkout service, we need mTLS or an equivalent workload identity, not just encryption. Third, what must the edge do with the traffic? A web application firewall, header-based routing or rate limiting at the edge all require the edge to decrypt.
Writing down the answers turns a debate about tools into a decision about requirements. If the answers are 'encrypt everywhere, authenticate services, inspect at the edge', the shape of the standard follows almost directly.
3Comparing the Options
Each place has a clear strength and a clear cost, and the costs are mostly operational.
| Option | Gives | Costs |
|---|---|---|
| Load balancer only | Simple; edge can inspect and route | Plain traffic inside the cluster |
| Load balancer, then re-encrypt | Encryption to the pod | Certificates in every app or sidecar |
| Service mesh mTLS | Encryption and identity, no app change | Mesh to run, upgrade and debug |
| Application (SSL bundles) | Encryption into the JVM | Each app manages certs and reload |
Notice that the mesh gives the most for the least application work: it encrypts every hop, gives each workload an identity, and rotates short-lived certificates automatically, without a line of Java. Its cost is the mesh itself, which is another system to operate. Application-level TLS has the opposite profile: no extra system, but every service must configure, rotate and monitor its own certificates.
4The Standard I Would Set
For an organisation that must encrypt inside the cluster and authenticate services, I would set three layers. Public traffic terminates at the load balancer or ingress, with a certificate managed centrally, so the edge can apply the firewall and routing rules. Traffic between services runs through the mesh with mTLS, so every hop is encrypted and authenticated, and applications speak plain HTTP to their local proxy. And the application terminates TLS itself only in named cases.
If the organisation does not run a mesh and does not plan to, the second layer becomes re-encryption from the ingress to the pods with application certificates, and then SSL bundles are used everywhere, with automated rotation. What matters most is that we pick one of these and apply it consistently, so an auditor or an on-call engineer can predict how any service is protected.
- Traffic from outside the organisation?YesTerminate at the edgeNoGo on
- Service to service inside the mesh?YesMesh mTLS, app speaks plain HTTP locallyNoGo on
- Outside the mesh or needs client certs?YesApplication with SSL bundlesNoAsk for a documented exception
3 steps in order. Play them, or step through them one at a time.
5Where SSL Bundles Fit
SSL bundles are the application's tool for the cases the edge and the mesh do not cover. The first is when the application must terminate TLS itself: a service outside the mesh, a workload on virtual machines, or a component where compliance requires the key to be inside the process. The second is outgoing calls that need client certificates, such as a partner API that demands mTLS with a certificate the partner issued, or a database that requires certificate authentication.
In those cases, the platform starter defines the bundle names and file locations, the certificates come from cert-manager or the organisation's certificate service, and reload-on-update avoids restarts. The rule that never changes is that issuing and rotation are automated in every option, at the edge, in the mesh and in the application, because manual certificate renewal is the most common cause of TLS outages.
6Documenting and Applying the Choice
The standard is written as a short decision record: the requirements, the chosen layers, the exception cases and who owns each certificate. The service template implements it, so a new service gets the mesh annotation and no server TLS by default. A platform check flags services that terminate TLS without a recorded reason, and the certificate inventory lists every certificate with its owner and expiry. Once a year we review the record against new compliance requirements, since an audit finding about plain traffic inside the network is much easier to answer with a document that shows the decision and its reasons.
7Follow-up questions
Is plain HTTP inside the cluster ever acceptable?
It can be, if the requirements and the risk assessment allow it, for example a small internal system with no sensitive data and strict network policies. But the trend in compliance and in zero-trust security is to encrypt every hop, so it should be an explicit, documented decision rather than a default.
Does mTLS in the mesh replace authentication in the application?
It proves which workload is calling, not which user. The application still needs to authenticate and authorise the end user, for example with a token, and can use the mesh identity as an extra check on which services may call which endpoints.
What about TLS between the application and the database?
It is a separate hop that the mesh may or may not cover, especially for managed databases outside the cluster. Most drivers configure it themselves, and Boot can apply SSL bundles to several data stores, so the standard should name it explicitly.
8Conclusion
In this answer, we saw that choosing where TLS ends is choosing where traffic is readable. We decide from security needs, end-to-end encryption, service identity and compliance, then use the edge for public traffic, a mesh for mTLS between services without application changes, and SSL bundles where the application must terminate TLS or present client certificates. Certificate issuing and rotation are automated everywhere, and the choice is documented and applied consistently.
Open with
I would start from requirements rather than tools, because terminating TLS means that is where traffic becomes readable. The questions are: must traffic be encrypted end to end inside the network, must services prove their identity to each other with mTLS, and what does compliance require, for example PCI for card data.
Then, if they want more
Then each place has a role. The load balancer or ingress terminates public traffic, because the edge needs to decrypt for firewall rules and routing. Between services, a service mesh gives mTLS on every hop with automatic certificate rotation and no application changes, so apps talk plain HTTP to their local proxy.
If we do not run a mesh, the alternative is re-encrypting to the pods with application certificates.
SSL bundles fit the cases the edge and mesh do not cover: an application that must terminate TLS itself, for example outside the mesh or because the key must live in the process, and outgoing calls that need client certificates, like a partner API.
In every case issuing and rotation are automated, with cert-manager or the mesh, because manual renewal causes most TLS outages. Finally, I would document the decision with its exceptions, build it into the service template, and apply it consistently, so anyone can predict how a service is protected.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Boot reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "TLS is terminated in different places across your services: at the load balancer, a...": https://scrivio-interview-library.netlify.app/spring-boot/embedded-servers/3d817000a8/