<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Erandi Ganepola on Medium]]></title>
        <description><![CDATA[Stories by Erandi Ganepola on Medium]]></description>
        <link>https://medium.com/@erandiganepola?source=rss-a85df5f6123e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-TVEKHYIbmP6t6WvMFWoQg.jpeg</url>
            <title>Stories by Erandi Ganepola on Medium</title>
            <link>https://medium.com/@erandiganepola?source=rss-a85df5f6123e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 06:07:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@erandiganepola/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Agentic Enterprise Era Is Here: Cell-Based Architecture Matters More Than Ever!]]></title>
            <link>https://erandiganepola.medium.com/the-agentic-enterprise-era-is-here-cell-based-architecture-matters-more-than-ever-47f4399b6594?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/47f4399b6594</guid>
            <category><![CDATA[abc]]></category>
            <category><![CDATA[cell-based-architecture]]></category>
            <category><![CDATA[agentic-enterprise]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 08:03:15 GMT</pubDate>
            <atom:updated>2026-06-08T10:12:22.455Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K0w10FpzbasoHtcN9GEMXg.png" /></figure><h3>The Agentic Enterprise Era: Why “Agents in Production” Changes the Game</h3><p>For over a decade, enterprise architects have built digital platforms around a well-understood set of building blocks: systems of record, backend services, third-party integrations, APIs such as REST, GraphQL and gRPC, event-driven flows, and frontends. Architectural patterns like microservices, domain-driven design (DDD), and event-driven architectures provided the guardrails for reusability, composability, modularity, resiliency and security. These patterns worked well because the interaction model was predictable: a human or a known upstream system calls a well-defined interface securely, and the system responds deterministically.</p><p>The agentic era changes this equation fundamentally.</p><p>AI agents, tools, MCP servers (for agent-to-tool integration), A2A protocol endpoints (for agent-to-agent communication), and agent-to-human flows are all entering the enterprise architecture picture. These are not minor additions. They introduce a new class of consumer that is autonomous, non-deterministic, and capable of chaining actions across multiple systems in ways that no human operator explicitly orchestrated and it is evolving rapidly more than ever.</p><p>By the end of 2025, most of these were proof of concepts (PoCs). Now enterprises are moving them to production, and for good reason: you cannot keep burning money on PoCs without delivering real business value. But the open secret is that these systems are expensive and risky to operate without proper authentication, authorization, and architectural governance.</p><p>As agents proliferate across the enterprise, a set of concrete failure modes emerges:</p><ul><li><strong>Ownership gaps:</strong> Who owns the agent? Who owns the tool it calls? Who owns the data it accesses? When something goes wrong, when a customer gets a wrong answer or an unauthorized action is taken, who is accountable? In a traditional architecture, ownership follows the service boundary. With agents that span multiple services, ownership becomes ambiguous unless the architecture and security enforce it.</li><li><strong>Duplicated domain logic:</strong> Without clear boundaries, teams end up reimplementing the same business logic, once for the REST API, once for the agent-facing tool, once for the event consumer. Each copy creates inconsistency and maintenance overhead.</li><li><strong>Permission sprawl:</strong> Agents are often granted broad access to “get things working” one way or another. In a PoC, this is tolerable. In production, it is a security incident waiting to happen. Without scoped delegation, an agent that should only read inventory data can end up with write access to the order system.</li><li><strong>Risky east-west access (egress traffic):</strong> Agents calling across system boundaries without proper trust propagation create lateral movement risks. An agent in one domain invokes a tool in another domain, and neither domain knows the full context of who authorized the action or why.</li><li><strong>Cost and runaway automation.</strong> LLM calls cost money. An agent stuck in a recursive loop or making unnecessary tool calls can burn through token budgets in minutes. Without rate limits and cost caps, the bill arrives before the bug is found.</li></ul><p>They are the practical and predictable consequences of introducing autonomous, non-deterministic components into architectures designed for deterministic interactions, especially when agents are becoming a part of a brown field project. That’s why the solution is required to adopt an architecture that makes agents governable by design. Cell-Based Architecture (CBA) provides exactly this.</p><h3>Cell-Based Architecture (CBA) in a Nutshell</h3><p>Most architects working with distributed systems are familiar with Domain-Driven Design (DDD). DDD is a design approach for modeling the business and structuring software around the domain. It helps you decide <em>what</em> the boundaries should be: which capabilities belong together, and where the seams between subdomains lie.</p><p>Whereas CBA is a runtime and reference architecture for making those boundaries operational. It answers the question of <em>how</em> boundaries become secured, deployable, governable and independently manageable units.</p><p>A <strong>cell</strong> is defined as a collection of components, grouped from design and implementation into deployment. It is independently deployable, manageable, and observable. Each cell functions as an immutable application component that can be built, deployed, and managed as a complete unit.</p><p>What a cell carries at runtime:</p><ul><li><strong>Multiple services</strong> that communicate internally via supported transports.</li><li><strong>Managed APIs/interfaces</strong> exposed through gateways or proxies.</li><li><strong>Ingress, egress policies</strong> <strong>and security context</strong> covering routing, throttling, and access control.</li><li><strong>Versioning, deployment and rolling update policies</strong> that govern how the cell is released and versioned.</li></ul><p>Every cell has an entry point, typically a gateway that exposes the cell’s capabilities as network-accessible endpoints. The gateway is where policies are enforced: authentication, authorization, rate limiting, and traffic management all happen at this boundary. Internal interfaces remain inaccessible from outside the cell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*8bI4ST1Qzx9qL4KukpWqKg.png" /><figcaption><em>Figure 1: Anatomy of a cell — gateway, internal components, data and control planes, and north-south vs east-west traffic</em></figcaption></figure><p>Traffic follows a directional model borrowed from networking:</p><ul><li><strong>North-south traffic</strong> flows between external consumers (such as web, mobile) and the cell, entering through the cell gateway.</li><li><strong>East-west traffic</strong> flows between cells within the enterprise, also governed by gateways and policies.</li></ul><p>Key principles govern how cells operate:</p><ul><li><strong>One team owns one cell:</strong> Practically, one team is responsible for development, deployment, and runtime of a cell. This creates clear accountability.</li><li><strong>Versioned APIs for inter-cell communication:</strong> Cells interact only through well-defined, versioned interfaces (OpenAPI, gRPC/Protobuf). This enables independent evolution.</li><li><strong>Cells own their domain data.</strong> External access to a cell’s data is only through cell interfaces such as APIs. Data replication to analytics layers is permitted, but cell APIs remain the source of truth<strong>.</strong> Also cells form flat hierarchies to prevent dependency chains.</li></ul><p>For the complete specification, the original Cell-Based Architecture reference architecture is available at: <a href="https://github.com/wso2/reference-architecture/blob/master/reference-architecture-cell-based.md">https://github.com/wso2/reference-architecture/blob/master/reference-architecture-cell-based.md</a></p><h3>How CBA Maps to Real Enterprises</h3><p>It is important to understand that the CBA is not an abstract framework, but rather a runtime reference. It maps directly to how enterprises are organized and how they need to operate. Let’s discuss how CBA concepts map to value streams, ownership, security and traffic patterns in this section.</p><h4>Mapping Cells to Domains and Value Streams</h4><p>Each cell aligns to a bounded context or value stream. As examples, an Order Management Cell owns the order lifecycle. A Customer Cell owns customer data and interactions. A Payments Cell handles transactions. These are not arbitrary groupings; they reflect the business domains that DDD identifies, now CBA made them operational as independently deployable units.</p><p>This mapping matters because it connects the architecture to the organizational structure. Conway’s Law tells us that systems mirror the communication structures of the organizations that build them. CBA makes this explicit and intentional: the cell boundary is also the team boundary.</p><h4>Teams, Ownership, and Accountability</h4><p>One team per cell is a practical approach. The team that develops a cell and its components also deploys it, operates it, and is accountable for its runtime behavior. When something breaks in the Order Cell, the order team is paged. When security policies need updating, the team that owns the cell updates them. This clarity eliminates the ambiguity that plagues shared-service models.</p><h4>Compliance and Security Boundaries</h4><p>Cells function as trust domains. Each cell enforces its own security policies at the gateway. This means compliance boundaries can align with cell boundaries: a cell that handles PII enforces data protection policies at its gateway, independent of what other cells do. For regulated industries, this is mandatory.</p><h4>Traffic and Integration Patterns</h4><p>Enterprise communication follows the directional model:</p><ul><li><strong>North-bound traffic</strong> (ingress) enters the enterprise through external-facing gateways. Web applications, mobile clients, IoT devices, partners, etc, all consume interfaces exposed by cells. Each cell’s gateway handles authentication, authorization, rate limiting, and policy enforcement for inbound traffic.</li><li><strong>South-bound traffic</strong> covers egress from a cell to third-party or external APIs, payment processors, shipping providers, SaaS platforms, etc. The cell’s gateway enforces egress policies, ensuring that outbound traffic is authorized and auditable.</li><li><strong>East-west traffic</strong> flows between cells within the enterprise. When the Order Cell needs customer data, it calls the Customer Cell’s API through its gateway. This traffic is also governed: mTLS, identity propagation, and policy enforcement apply to inter-cell communication just as they do to external traffic.</li></ul><p>No cell trusts another cell implicitly. You can clearly implement zero-trust principles in the cell architecture.</p><p>CBA helped to frame above architectural aspects in the enterprises over the past decade. Now let’s discuss how CBA can facilitate the new Era of agents in the same way.</p><h3>All Interfaces, One Boundary: Fitting APIs, Events, and Agent Surfaces into CBA</h3><p>This section presents what may be the most important architectural insight for the agentic era: traditional and agent-era interfaces are just different entry points into the same domain capability, governed by the same cell boundary.</p><p>A cell’s business capability does not change just because a new set of consumers shows up. The Order Cell manages orders regardless of whether the request comes from a REST API call, an event, or an AI agent invoking a tool.</p><h4>Traditional Surfaces (Already in CBA)</h4><p>Traditional surfaces such as request-response APIs (REST, GraphQL, gRPC, etc), events and streams are exposed through the cell gateway with policies, versioning, and access control. This is the established pattern and is supported by CBA already.</p><h4>Agent-Era Surfaces (New Entry Points into the Cells)</h4><p>The agentic era introduces new surface types, but they follow the same principle. They are entry points into the cell, governed by the cell gateway. Let’s see the most popular ones and how they fit in:</p><ul><li><strong>MCP servers</strong> have become the standard for agent-to-tool integration. The Model Context Protocol (MCP) standardizes how AI agents discover and invoke tools, access data sources, and interact with capabilities. An MCP server maps naturally to a cell: it exposes domain capabilities as tools, scoped by the cell’s boundary. This is the MCP-server-as-bounded-context pattern where each MCP server focuses on a specific domain, deployed and managed within the cell that owns that domain.</li><li><strong>MCP proxies and AI gateways </strong>are the MCP-aware equivalent of API gateways. Just as API gateways add authentication, rate limiting, and policy enforcement to REST APIs at the cell’s entry point, AI gateways do the same for MCP traffic. Major API gateway vendors have already begun adding MCP-aware capabilities to their products.</li><li><strong>A2A endpoints</strong> handle agent-to-agent communication across cells. Google’s Agent2Agent protocol (A2A), now a Linux Foundation project, provides a standard for task delegation, negotiation, and artifact exchange between agents. The industry consensus is clear: MCP handles agent-to-tool communication (within or into a cell), while A2A handles agent-to-agent communication (across cells). This maps directly to CBA’s east-west traffic model.</li></ul><p>The following diagram depicts traditional and agent era’s surfaces in CBA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*pCizQrW8F1ezdENKDWiu7w.png" /><figcaption><em>Figure 2: Traditional and agent-era surfaces as different entry points into the same domain cell</em></figcaption></figure><h4>The Brownfield Reality</h4><p>Most enterprises are not building from scratch. They have existing cells, or services that are organized or can be organized into cells that already expose REST APIs and consume events. The practical question is: how do we add agent interfaces without rebuilding everything?</p><p>The answer follows naturally from the multi-surface principle. Adding MCP and A2A endpoints to an existing cell is adding new surfaces to an existing boundary, not rebuilding the cell. The domain logic stays the same and clean. The team adds an MCP server that delegates to the existing services, an A2A endpoint for agent interoperability, and updated gateway policies for the new surfaces. This is incremental, not disruptive.</p><h3>Why CBA Becomes Even More Critical in the Agentic Era</h3><p>CBA provides modularity, governance, and clear boundaries, therefore why does the agentic era make it <em>more</em> critical? Because agents amplify every risk that CBA was designed to mitigate.</p><h4>Non-Determinism at the Boundary</h4><p>Traditional API consumers are deterministic. A web application calls the same endpoints in the same order with predictable parameters. You can test the interaction paths, and they remain stable between deployments.</p><p>Agents are fundamentally different. They make autonomous decisions about which tools to call, in what order, with what parameters, based on reasoning that is influenced by context, prompt content, and model behavior. An agent that worked reliably yesterday might chain tool calls differently today because the prompt context changed. This non-determinism amplifies the need for boundaries: every tool invocation must be authorized, scoped, and auditable because you cannot predict in advance exactly which invocation sequence will occur.</p><h4>The Governance Boundary</h4><p>Cells become the enforcement point for a set of concerns that are optional in a traditional architecture but mandatory in an agentic one to to comply with organizational policies and to avoid unpredictable behaviours as much as possible.</p><h4>Identity and access delegation</h4><p>Traditional OAuth 2.0 assumes deterministic applications with a single authenticated principal. An application authenticates as itself or on behalf of a known user, and the token reflects that identity. Agents break this model. They spawn sub-agents, operate across organizational boundaries, and make thousands of autonomous decisions daily.</p><p>When an agent in one cell delegates a task to an agent in another cell, the identity chain becomes: user authorized client, which delegated to agent A, which delegated to agent B which may only need a subset of access to perform a task. Without explicit support for this delegation chain, the downstream cell has no way to know who originally authorized the action or what scope was intended. This needs to be enforced at the cell boundary.</p><p>Standards are emerging to address this. As an example:</p><ul><li>The IETF draft “OAuth 2.0 Extension for AI Agent Delegation: (<a href="https://www.ietf.org/archive/id/draft-oauth-ai-agents-on-behalf-of-user-01.html">https://www.ietf.org/archive/id/draft-oauth-ai-agents-on-behalf-of-user-01.html</a>)&quot; extends the OAuth 2.0 Authorization Code Grant, the resulting JWT carries an explicit act claim that documents the full delegation chain from user through client to agent. This makes the delegation auditable and enforceable: each cell’s gateway can validate the delegation chain, verify that the actor is authorized for the requested scope, and enforce scope reduction at each delegation hop.</li></ul><p>At the cell level, this means each gateway validates (with its own Secure Token Service or via an external central IDP residing inside a different cell) not just “is this token valid?” but “is this actor authorized to perform this action on behalf of this user, through this delegation chain?” This is a structural upgrade to cell-level trust.</p><h4>Tool contracts and versioning</h4><p>Just as cells expose versioned APIs, agent-facing tools need versioned contracts. A tool contract specifies: what inputs the tool accepts (schemas), what permissions it requires, what rate limits apply, and what outputs it produces. Versioning prevents breaking changes from propagating, when a tool’s contract changes, the new version is published alongside the old one, and consumers migrate at their own pace. This extends CBA’s established principle of versioned interfaces to the agent era.</p><h4>Cost controls and budgets</h4><p>LLM calls have direct cost implications that traditional API calls do not. Each cell gateway can enforce token usage limits, rate limiting, and budget caps regardless of how many tool calls the agent attempts. This prevents runaway automation from becoming a runaway invoice.</p><h4>Observability and audit</h4><p>The audit question for the agentic era is: <em>who called what, with which permissions, at what cost, and why?</em> This goes beyond traditional metrics, logs, and traces. Agent observability requires token usage tracking per agent and per tool call, prompt and response content auditing (with PII redaction), chain-of-thought and reasoning step logging, and tool invocation tracing with full parameter capture. The cell gateway is the natural instrumentation point for all of this, since every inbound and outbound request passes through it.</p><p>With CBA, they are structural, enforced at the cell boundary, applied uniformly across all surfaces, and auditable by design.</p><h3>Reference Patterns for CBA in an Agentic Enterprise</h3><p>This section presents concrete patterns for building cells that support agent workloads, organizing shared capabilities across cells, and managing the cross-cutting concerns that span the entire architecture.</p><h4>Inside a Cell</h4><p>When a cell supports agent workloads, it may contain the following components (in addition to traditional services):</p><ul><li><strong>Domain services</strong> remain the core. These are the microservices, functions, or integration logic that implement the cell’s business capability. They do not change because agents are involved.</li><li><strong>Agent runtime</strong> (optional): If the cell hosts an AI agent that orchestrates within its domain, the agent runtime lives inside the cell. The agent interacts with domain services through internal APIs (local mesh/internal gateway), just as any other component would.</li><li><strong>Skills: </strong>Skills are reusable, composable units of agent capability, packaged logic that determines how an agent accomplishes a specific task (e.g., “process a refund,” “summarize a document).</li><li>Domain-specific skills that are tightly coupled to a cell’s business logic live inside the cell as part of the agent runtime or tool catalog. For example, a “calculate shipping options” skill belongs inside the Order Cell. Cross-domain skills that multiple agents across different cells need, such as document summarization or translation are better organized as capability cells with their own ownership, versioned contracts, and access policies, consumed via east-west traffic.</li><li><strong>RAG layer and knowledge sources:</strong> Vector stores, document indexes, and knowledge bases scoped to the cell’s domain to provide domain-specific context to the agent runtime.</li><li><strong>MCP server:</strong> Exposes the cell’s capabilities as tools that agents (internal or external) can discover and invoke.</li><li><strong>Tool catalog:</strong> A registry of available tools within the cell, with contracts that specify input/output schemas, required permissions, rate limits, and versioning information. The tool catalog is what agents query to discover what the cell can do.</li><li><strong>Guardrails and policies:</strong> Agent-specific safety controls enforced at the cell level, typically at the gateway such as: input validation, prompt sanitization, output filtering for hallucination detection, PII leakage, etc.</li><li><strong>Observability instrumentation:</strong> Beyond traditional metrics, logs, and traces, agent-enabled cells are instrumented for:<br>- Token usage and cost tracking per agent, per tool call.<br>- Prompt and response content auditing with automatic PII redaction.<br>- Chain-of-thought and reasoning step logging.<br>- Tool invocation tracing with full parameter and response capture.</li><li><strong>Evals:</strong> Testing and evaluation of agent behaviors within the cell’s domain, and they can run as part of the cell’s CI/CD pipeline.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*cMqhDWpq6UEY2KH8_jZdRg.png" /><figcaption><em>Figure 3: Internal components of a cell supporting agent workloads</em></figcaption></figure><h4>Across Cells: Capability Cells and Controlled Reuse</h4><p>When multiple domain cells need access to shared tools or integrations, a common temptation is to create a single central tool service or MCP hub that every agent calls. This is the <strong>tool monolith</strong> anti-pattern. It creates a single point of failure, permission sprawl, and ownership ambiguity.</p><p>The alternative is <strong>capability cells</strong>. Shared tools and integrations are organized as their own cells, each with clear ownership, scoped permissions, versioned tool contracts, independent scaling and lifecycle and its own gateway, policies, and observability</p><p><strong>LLM access: </strong>The agent runtime needs an LLM to reason and make decisions, but the LLM itself does not live inside the domain cell. It is consumed as an external service through one of two patterns.</p><ul><li>In the most common pattern, the agent runtime calls a hosted LLM provider (Anthropic, OpenAI, etc.) through the cell’s egress gateway as south-bound traffic, just like any other third-party API, with token budgets, rate limits, and cost tracking enforced at the gateway.</li><li>Alternatively, organizations running self-hosted models for compliance or latency reasons can expose them as an LLM Capability Cell, a shared cell with its own gateway, access policies, rate limits, and token budgets, consumed by domain cells via governed east-west traffic.</li><li>In either case, the cell boundary is where cost and access controls are enforced: the agent runtime inside the cell makes LLM calls, and the gateway ensures those calls are authorized, budgeted, and auditable.</li></ul><p>With the above discussed reference patterns, let’s see how we can design a multi-agent scenario in the next section.</p><h3>Walkthrough: Multi-Agent Scenario</h3><p>To bring these patterns together, consider a concrete scenario: an event planning agent and a travel booking agent collaborating to plan a team offsite.</p><h4>The Cells</h4><ul><li><strong>Event Planning Cell.</strong> Owns the event domain: venue search, scheduling, attendee management, and budget tracking. Contains an agent runtime, an MCP server exposing event-planning tools, and a RAG layer with venue and event knowledge. Owned by the events team.</li><li><strong>Travel Booking Cell.</strong> Owns the travel domain: flight search, hotel booking, and itinerary management. Contains its own agent runtime, MCP server, and integrations with external travel APIs (south-bound traffic to airline and hotel systems). Owned by the corporate travel team.</li><li><strong>Policy and Compliance Cell</strong> (capability cell). Enforces travel policies, budget limits, and approval workflows. Owns the rules for preferred vendors, spending thresholds, and HITL approval gates. Owned by the finance/compliance team.</li></ul><p><strong>LLM Access:</strong> In this scenario the agent runtime calls a remotely hosted LLM provider (Anthropic) through the cell’s egress gateway as south-bound traffic with rate limits, policies, etc enforced at the gateway.</p><h4>The Flow</h4><p>A user requests: <em>“Plan a team offsite in Florida for 20 people, March 15–17.”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vkAzcL3RTbRs8RU4tKoOrg.png" /><figcaption><em>Figure 4: Multi-agent scenario — cross-cell communication with identity propagation and governance</em></figcaption></figure><ul><li><strong>Step 2: Event agent uses internal tools.</strong> The event planning agent breaks down the task and uses its MCP tools to search for venues in Florida that accommodate 20 people. The RAG layer provides context from past events and venue databases. These are internal tool calls within the cell (local mesh/internal gateway), no cross-cell communication is needed yet.</li><li><strong>Step 3: Event agent delegates to travel agent via A2A.</strong> The event agent determines that travel arrangements are needed. It delegates the travel booking task to the travel agent in the Travel Booking Cell via A2A (east-west traffic). The A2A protocol handles task delegation for event agent.</li><li><strong>Step 4: Identity propagation.</strong> The delegation chain is captured in the token’s act claim: user → event agent → travel agent at the gateway (otherwise this can be verified by calling a central IDP in another cell). When the Travel Booking Cell’s gateway receives the request, it validates the full delegation chain. It verifies that the event agent is authorized to delegate travel tasks, and that the travel agent is authorized to act on behalf of this user through this delegation path.</li><li><strong>Step 5: Travel agent uses internal tools.</strong> The travel agent calls flight and hotel search tools within its own cell via MCP. It also makes south-bound calls to LLM and external airline and hotel APIs through the cell’s egress gateway.</li><li><strong>Step 6: Compliance check via capability cell.</strong> Before booking, the travel agent calls the Policy and Compliance Cell (east-west traffic) to validate that the proposed bookings comply with corporate travel policy.</li><li><strong>Step 7: HITL checkpoint.</strong> The Policy Cell evaluates the total booking cost. The flights and hotels for 20 people exceed the $5,000 threshold. The Policy Cell triggers an HITL approval gate: the booking is paused, and a notification is sent to the user’s manager for approval. The agent cannot proceed until the checkpoint is satisfied.</li><li><strong>Step 8: Audit trail.</strong> Throughout the entire flow, every tool invocation is logged: who called what, on whose behalf, with what parameters, at what cost, and with what result.</li><li><strong>Step 9: Results.</strong> Once approval is granted, the travel agent completes the bookings and returns the itinerary to the event agent via A2A. The event agent combines venue details with travel plans and presents the complete offsite plan to the user.</li></ul><h4>What CBA Provides in This Scenario</h4><p>At the start of this article, we identified failure modes that emerge when agents enter the enterprise without architectural guardrails. This walkthrough addresses them:</p><ul><li><strong>Ownership gaps eliminated:</strong> Each cell has a single owning team, and incident response never devolves into cross-team finger-pointing. Ownership followed the cell boundary, not an org chart negotiation.</li><li><strong>Duplicated domain logic avoided:</strong> Same domain services process calls coming from different consumer types.</li><li><strong>Permission sprawl prevented by design: </strong>Each agent operated within its own cell and accessed other cells only through governed gateways that enforced authorization at every hop. The delegation chain (user → event agent → travel agent) was explicit in the token, and each gateway can validate it.</li><li><strong>Risky east-west access governed at every hop:</strong> When the event agent delegated to the travel agent (east-west), and when the travel agent called external APIs (north-south), every cross-cell interaction went through a gateway that enforced identity propagation, scope validation, and policy checks.</li><li><strong>Cost and runaway automation are contained at the boundary:</strong> Each cell tracked and capped token spent independently. Cost control was a policy the gateway enforced.</li></ul><p>This is a single scenario with three cells and two agents, but the above factors are the same ones that emerge at enterprise scale. CBA ensures they are handled structurally at the boundary.</p><h3>Conclusion</h3><p>This article demonstrated how CBA addresses the architectural and operational requirements of the agentic era such as ownership gaps, duplicated domain logic, permission sprawl, risky east-west access, and cost and runaway automation in a single multi-agent scenario. When you multiply that across dozens of domains, hundreds of agents, and thousands of daily tool invocations, without structural governance, these become inevitable at scale.</p><p>The agentic era does not require new architecture from scratch. It requires existing architecture done right, with boundaries that are enforced. Perhaps most importantly, the majority of agentic projects in enterprises are brownfield, not greenfield. Organizations are adding agent capabilities to existing systems, not replacing those systems. CBA supports this reality directly: adding MCP servers and A2A endpoints to existing cells is adding new surfaces to established boundaries, not starting over.</p><p>The litmus test for a production-ready agentic architecture is simple: <em>Can you answer who called what, with which permissions, at what cost, and on whose behalf?</em> If the answer is yes, you have a production architecture. If the answer is “it depends” or “we’d have to check the logs,” you have a PoC. CBA makes that accountability structural.</p><p>For organizations starting this journey, the practical path is incremental:</p><ol><li><strong>Start with your existing bounded contexts.</strong> If you already have domain-aligned services, you are closer to CBA than you think.</li><li><strong>Add agent surfaces to existing cells.</strong> MCP servers, and A2A endpoints are new entry points, not new architectures. Existing domain logic stays the same.</li><li><strong>Enforce governance at the gateway.</strong> Identity delegation, ABAC policies, cost controls, and audit logging all apply at the cell boundary.</li><li><strong>Organize shared capabilities as capability cells,</strong> not central hubs. Avoid the tool monolith anti-pattern.</li><li><strong>Iterate.</strong> CBA supports three levels of iteration components within cells, individual cells, and the enterprise architecture as a whole so you can evolve incrementally without big-bang rewrites.</li></ol><p>The architecture you choose will determine whether your agents are governed assets or ungoverned liabilities. Cell-Based Architecture makes the difference structural.</p><h3>Further Reading</h3><ul><li>Cell-Based Architecture — Reference Architecture: <a href="https://github.com/wso2/reference-architecture/blob/master/reference-architecture-cell-based.md">https://github.com/wso2/reference-architecture/blob/master/reference-architecture-cell-based.md</a></li><li>OpenChoreo (<a href="https://github.com/openchoreo/openchoreo">https://github.com/openchoreo/openchoreo</a>), a CNCF Sandbox project, provides an open-source implementation of these patterns for teams that want to start building.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47f4399b6594" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Cell-Based Architecture to OpenChoreo]]></title>
            <link>https://erandiganepola.medium.com/from-cell-based-architecture-to-openchoreo-82b4bca832b7?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/82b4bca832b7</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[cell-based-architecture]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[openchoreo]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Sat, 29 Nov 2025 09:20:10 GMT</pubDate>
            <atom:updated>2026-01-18T04:50:24.199Z</atom:updated>
            <content:encoded><![CDATA[<h3>Turning a Reference Architecture into a Working Platform</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZeCO8Ww7QRlZvn_rxOI-Dw.jpeg" /><figcaption><em>Source - </em><a href="https://nyulangone.org/news/cells-move-groups-differently-they-do-when-alone"><em>https://nyulangone.org/news/cells-move-groups-differently-they-do-when-alone</em></a></figcaption></figure><p>Over the last decade, many engineering teams have felt the growing pains of moving from monoliths to microservices. We gained flexibility and independence, but also inherited more moving parts, more YAML, and more ways for things to go wrong.</p><p><a href="https://github.com/wso2/reference-architecture/blob/master/reference-architecture-cell-based.md">WSO2’s <strong>cell-based architecture</strong></a> was introduced as a way to bring order to that chaos: a powerful reference architecture and a clear business-centric approach to structure modern systems. With <a href="https://openchoreo.dev/"><strong>OpenChoreo</strong></a>, WSO2 has now turned that theoretical model into a practical, open-source internal developer platform you can run on Kubernetes.</p><p>This article looks at both sides:</p><ol><li>What <a href="https://github.com/wso2/reference-architecture/blob/master/reference-architecture-cell-based.md"><strong>cell-based architecture (CBA)</strong></a> is and why it matters.</li><li>How <a href="https://openchoreo.dev/"><strong>OpenChoreo</strong></a> applies those ideas in a real platform and helps you get value from them.</li></ol><h3>Cell-Based Architecture</h3><p>Cell-Based Architecture (CBA) is a reference architecture style introduced by WSO2’s Asanka Abeysinghe (CTO) and Paul Fremantle (founding CTO) as a decentralized approach to designing cloud-native systems.</p><p>In this article, we’ll explore the core ideas behind it in a simplified way.</p><p>For deeper reference, see the official specification: <a href="https://github.com/wso2/reference-architecture"><em>https://github.com/wso2/reference-architecture</em></a></p><h4>What is a biological cell?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*EDxREfXDiWD_TE2MsSDt5A.jpeg" /><figcaption>Source — <a href="https://www.cancer.gov/publications/dictionaries/cancer-terms/def/cell">https://share.google/images/eJl95EqpZToG5kjad</a></figcaption></figure><p>In biology, a cell is the smallest unit of life that can survive and function on its own: it has a clear boundary (the cell membrane), its own internal machinery (organelles), and well-defined ways to exchange signals and resources with its environment. This combination of autonomy, encapsulation, and controlled interaction inspired the term cell-based architecture (CBA).</p><h4>What is a “cell” in this reference architecture?</h4><p>In CBA, a cell is a group of related components plus a well-defined boundary and gateway:</p><ul><li><strong>Components: </strong>any workload: microservices, integrations, event processors, tasks, UI backends, etc.</li><li><strong>Cell boundary: </strong>usually aligned with a <strong>domain (business or technical) or bounded context</strong> from Domain-Driven Design, or sometimes with a specific team’s responsibility.</li><li><strong>Cell gateway (the “membrane”): </strong>the only entry point for incoming traffic. It exposes the cell’s APIs (REST, gRPC, GraphQL, events, streams) and enforces security, policies, and contracts.</li></ul><p>Instead of reasoning about hundreds of microservices, CBA asks you to reason about <strong>cells,</strong> each one a cohesive group of capabilities behind a well-defined boundary. A cell becomes the primary unit you design, secure, deploy, and observe. In other words, you think and talk in terms of “Customer cell”, “Orders cell”, or “Payments cell”, rather than a long list of individual services.</p><h4>North-South and East-West traffic</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*KuYLUGsH7d8_0lJF57JCfw.png" /><figcaption>Source - reference-architecture| <a href="https://github.com/wso2/reference-architecture/blob/master/media/ra-cell-com-tc-v3-20.1.png">https://github.com/wso2/reference-architecture/blob/master/media/ra-cell-com-tc-v3-20.1.png</a></figcaption></figure><p>In a cell-based architecture, <strong>north–south</strong> traffic refers to communication between external clients or systems and a cell’s public interface (its gateway), i.e. external requests coming in and responses or calls going out. In contrast, <strong>east–west</strong> traffic describes internal communication; either between different cells or between internal components within the same cell for things like service-to-service calls, event flows or inter-cell coordination. By enforcing that all inbound/outbound interactions go through the cell gateway (north–south) and keeping internal interactions as east–west (can go through an internal gateway).</p><h4>Cells are business-centric</h4><p>CBA encourages you to derive cells from <strong>business domains</strong>, not technical layers.</p><p><strong>Let’s take an example:</strong></p><p>Instead of “user-service”, “order-service”, “payment-service” as disconnected boxes, you identify slices like:</p><ul><li><strong>Orders Cell: </strong>order capture, pricing rules, order status</li><li><strong>Customer Cell: </strong>profiles, preferences, KYC</li><li><strong>Payments Cell: </strong>authorization, settlement, refunds</li></ul><p>Each of these becomes a cell with its own gateway, components, and data. The architecture naturally aligns with how the business is structured, and each cell has a clear owner (usually a long-lived product or domain team).</p><h4>How cells talk to each other</h4><p>Cells communicate through well-defined patterns:</p><ul><li><strong>Synchronous APIs</strong> for point-in-time queries and commands</li><li><strong>Event-driven interactions</strong> for workflows (e.g., “orderPlaced” events consumed by billing, shipping, and notification cells)</li><li><strong>Internal gateway; </strong>even the communication between cells can happen via an internal gateway.</li></ul><p>This keeps cells <strong>loosely coupled</strong>. One cell can evolve its internals, switch tech stacks, change schema, and refactor services as long as it preserves its contracts.</p><h4>Why cell-based architecture helps</h4><p>By moving from “microservice sprawl” to “cell-shaped capabilities”, organizations gain:</p><ul><li><strong>Stronger boundaries: </strong>both at the code and infrastructure level</li><li><strong>Independent deployability: </strong>cells can be released on their own cadence</li><li><strong>Better resilience: </strong>failures are naturally contained within a cell</li><li><strong>Clear ownership: </strong>teams own cells end-to-end: build, run, and improve</li><li><strong>Consistent governance: </strong>policies live at cell boundaries instead of being scattered across random services</li></ul><p>So far, this is the theory. It’s a powerful way to think, but it still leaves a big question:</p><blockquote>How do you operate a whole landscape of cells on real infrastructure without drowning in tooling?</blockquote><p>One thing to keep in mind is that when applying concepts to the practical world, it should always be theory plus context! That’s where <strong>OpenChoreo</strong> comes in :)</p><h3>OpenChoreo</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7bcCEAodNoiCmqLe5KkcdQ.png" /><figcaption>Source - <a href="https://openchoreo.dev/">https://openchoreo.dev/</a></figcaption></figure><h4>Why a platform is needed: from architecture diagrams to daily work</h4><p>You don’t get the benefits of CBA just by drawing nicer diagrams.</p><p>In real life, each cell needs:</p><ul><li>API gateways and networking</li><li>CI pipelines</li><li>Container builds and deployments</li><li>Security and policy enforcement</li><li>Observability (logs, metrics, traces)</li><li>Multiple environments (Dev, Test, Prod)</li><li>A consistent way for developers to define and connect components and many more..</li></ul><p>Doing this manually for each cell and for every team quickly becomes unmanageable.</p><p>This is exactly the problem <strong>Internal Developer Platforms (IDPs)</strong> try to solve: give developers a higher-level model (“deploy this component into this cell”) and let the platform handle all the plumbing.</p><p><strong>OpenChoreo</strong> is WSO2’s open-source answer to that challenge, explicitly shaped by cell-based architecture.</p><p>Link to GitHub repo - <a href="https://github.com/openchoreo/openchoreo"><em>https://github.com/openchoreo/openchoreo</em></a></p><h4>OpenChoreo: A practical platform built around cells</h4><p><strong>OpenChoreo</strong> is a <strong>Kubernetes-native internal developer platform</strong> that takes the concepts of CBA and bakes them into how you model, deploy, and operate software.</p><p>You can think of it as:</p><blockquote>A blueprint and implementation for running cell-based architecture on your own Kubernetes clusters.</blockquote><h4>Core concepts: from cells to platform objects</h4><p>OpenChoreo introduces a set of platform concepts that map neatly to CBA:</p><ul><li><strong>Organization: </strong>the top-level tenant (usually your company or division)</li><li><strong>Projects: </strong>logical groupings of capabilities (often aligned to business domains or products). As per our previous example:<br>- <strong>Orders Cell -&gt; maps to Orders project<br>- Customer Cell -&gt; maps to Customer project<br>- Payments Cell -&gt; Payments project</strong></li><li><strong>Components: </strong>the individual workloads inside a project: services, UIs, scheduled tasks, etc.</li><li><strong>Endpoints &amp; Connections: </strong>how components expose functionality and how they talk to other components or external systems</li><li><strong>Data planes: </strong>the actual Kubernetes clusters that run your workloads (Dev, Staging, Prod), each wired with the right security and networking</li></ul><p>A <strong>cell</strong> in CBA terms typically shows up as a <strong>project (or set of tightly related projects)</strong> with:</p><ul><li>A gateway component handling external/API traffic</li><li>Internal components implementing the cell’s behaviour</li><li>Connections to data stores and other cells</li></ul><h4>North-South and East-West traffic in OpenChoreo:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XqZPA2QZg753xkZEuvaRcA.png" /><figcaption>Source - <a href="https://github.com/openchoreo/openchoreo/blob/main/docs/images/openchoreo-cell-runtime-view.png">https://github.com/openchoreo/openchoreo/blob/main/docs/images/openchoreo-cell-runtime-view.png</a></figcaption></figure><p>The following explains it further:</p><p><strong>Northbound Ingress:</strong></p><ul><li>Routes incoming traffic from external (internet) sources into the cell.</li><li>Endpoints with “visibility-public” are exposed through this ingress path.</li></ul><p><strong>Southbound Egress:</strong></p><ul><li>Handles outbound internet access from components in the Cell.</li><li>Connections to external services are routed through this egress path.</li></ul><p><strong>Westbound Ingress:</strong></p><ul><li>Handles traffic entering the Cell from within the organization, be it from another cell or just from the internal network.</li><li>Endpoints with “visibility-organization” are exposed through this ingress path.</li></ul><p><strong>Eastbound Egress:</strong></p><ul><li>Handles outbound traffic to other cells or to the internal network.</li></ul><p>All of this is represented declaratively, using Kubernetes-style resources (CRDs). You describe the intent; the platform reconciles it into reality.</p><h4>Control Plane + Data Plane</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jID1K-iQgH-JRh_ifAwfWg.png" /><figcaption>Source - <a href="https://github.com/openchoreo/openchoreo/blob/main/docs/images/openchoreo-platform-abstractions.png">https://github.com/openchoreo/openchoreo/blob/main/docs/images/openchoreo-platform-abstractions.png</a></figcaption></figure><p>OpenChoreo separates concerns clearly:</p><h4><strong>Control plane</strong></h4><ul><li>Manages projects, components, environments</li><li>Defines policies and access control</li><li>Orchestrates CI pipelines and integrations with Git, registries, and observability</li></ul><h4><strong>Data plane</strong></h4><ul><li>Is where your workloads actually run</li><li>Comes pre-wired with secure networking, gateways, and observability</li><li>Enforces the contracts and policies defined at the cell/project level</li></ul><h4>From developer intent to running cells</h4><p>Here’s what day-to-day work looks like in an OpenChoreo world:</p><ol><li>A team defines or updates a <strong>component</strong> in a project (e.g., “orders-api”, “orders-ui”).</li><li>They declare <strong>endpoints</strong> (how it’s exposed) and <strong>connections</strong> (which other components or cells it can talk to).</li><li>The platform: Sets up or updates the <strong>CI pipeline</strong></li><li>Builds and deploys the component to the right <strong>data plane</strong> (Dev/Staging/Prod)</li><li>Configures <strong>gateways, routes, and policies</strong> so that only the allowed interactions happen</li><li>Publishes <strong>observability</strong> data into the central stack</li></ol><p>Because all cells follow the same patterns and abstractions, new teams can onboard faster, and platform teams can improve the underlying stack without breaking everyone’s apps.</p><h4>The value of CBA + OpenChoreo</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jzIVLVb89lljvSayrJiM9A.png" /><figcaption>Source - <a href="https://github.com/openchoreo/openchoreo/blob/main/docs/images/openchoreo-ddd-to-cell-mapping.png">https://github.com/openchoreo/openchoreo/blob/main/docs/images/openchoreo-ddd-to-cell-mapping.png</a></figcaption></figure><p>Adopting <strong>Cell-Based Architecture</strong> without the right platform leaves you with a great model but a lot of manual plumbing. Adopting <strong>OpenChoreo </strong>without a clear structural model risks turning into “just another Kubernetes tool”. The real value appears when you use them together: CBA defines <strong>what</strong> your system should look like (cells as business-aligned, autonomous units), and OpenChoreo defines <strong>how</strong> to run that system in a consistent, automated way.</p><p>With <strong>CBA + OpenChoreo</strong> you get:</p><ul><li><strong>Business-aligned architecture: </strong>cells map cleanly to domains and products, and OpenChoreo’s Projects/Components/Endpoints mirror those boundaries in the platform.</li><li><strong>Faster, safer delivery: </strong>teams own their cells end-to-end, while CI/CD, routing, and environment promotion are standardized by the platform.</li><li><strong>Built-in security and zero-trust: </strong>with inbuilt support,<strong> </strong>each cell becomes a security boundary; ingress/egress and inter-cell traffic are enforced by gateways and policies, not ad-hoc code.</li><li><strong>Consistent observability and governance: </strong>every exposed endpoint and interaction flows through a common catalogue, gateways, and telemetry pipeline, making compliance and troubleshooting much easier.</li><li><strong>Less infrastructure noise, more product focus: </strong>developers describe intent at the cell/component level, and OpenChoreo handles Kubernetes details, so engineering time shifts from wiring clusters to delivering features.</li></ul><h3>Where to go from here</h3><p>If you’re exploring this space, a pragmatic next step could look like this:</p><ol><li><strong>Pick 1–2 business domains</strong> and model them as cells: identify boundaries, APIs, and events.</li><li><strong>Map those cells into OpenChoreo concepts</strong>: projects, components, endpoints, connections, and environments.</li><li><strong>Run a pilot</strong> <strong>using OpenChoreo</strong> on a non-production cluster: measure how long it takes to go from commit to deployed cell, how easy it is to add new components, and how much platform work gets standardized.</li></ol><h3>Conclusion</h3><p>Cell-Based Architecture gives us a cleaner way to think about modern systems: not as a tangle of microservices, but as a set of autonomous, business-aligned cells with clear boundaries and contracts. OpenChoreo takes that architectural idea and turns it into something you can actually operate day to day, with consistent abstractions, built-in security, traffic management, and observability on top of Kubernetes.</p><p>If you’re already feeling the complexity of microservices and platform sprawl, combining CBA with OpenChoreo offers a practical way forward: design around cells, let the platform handle the heavy lifting, and free your teams to focus on delivering real business capabilities instead of endlessly wiring infrastructure!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82b4bca832b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Open Banking and Open Finance Are Driving the Next Wave of FinTech Innovation]]></title>
            <link>https://medium.com/swlh/how-open-banking-and-open-finance-are-driving-the-next-wave-of-fintech-innovation-b9aac67870d9?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9aac67870d9</guid>
            <category><![CDATA[open-banking]]></category>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[open-finance]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 06:46:58 GMT</pubDate>
            <atom:updated>2025-01-10T06:52:51.714Z</atom:updated>
            <content:encoded><![CDATA[<h3>Let’s start with a real-world scenario</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bXjVsdF5BFIYrhHJqvAUIA.jpeg" /><figcaption><em>Figure I — Add bank account to a third party investment platform</em></figcaption></figure><p>Imagine a user who wants to invest in the U.S. stock market. To start trading through an online platform, let’s say, Interactive Brokers (IBKR), they must link their bank account (ex: Wise) and transfer funds. After signing in to IBKR and granting the necessary consent, the user can seamlessly connect their Wise account and transfer money to purchase stocks. The user can also link multiple bank accounts to IBKR, facilitating diverse investment strategies without juggling separate logins or one-by-one transfers. In today’s FinTech environment, such a connected ecosystem is not just a convenience; it’s rapidly becoming the norm forcing financial organizations to be modernized.</p><p>Without this level of integration, managing multiple accounts and transactions would be cumbersome and inefficient. The ability to securely connect different financial services under one umbrella, most importantly with the user’s consent, exemplifies the very essence of Open Banking and Open Finance concepts that are reshaping the financial landscape.</p><p>Now let’s discuss the definitions of these technical terms Open Banking, Open Finance, Open Data and their importance;</p><h3>Open Banking and Open Finance in a Nutshell</h3><p><strong>Open Banking (OB)</strong> securely exposes financial data and services (like account information and payment initiation) through standardized APIs to authorized third parties. This regulatory or voluntary framework is common in regions such as the UK, Europe, Australia, and Brazil. It allows developers and financial institutions to create new, consumer-centric financial products.</p><p><strong>Open Finance (OF)</strong> extends the Open Banking model beyond traditional banking services into areas like investments, lending, insurance, and more. By providing access to a broader range of financial data through open APIs, Open Finance fosters competition, innovation, and enhanced customer control. This can drive the creation of personalized financial offerings, ultimately delivering better value to consumers.</p><p>Following are such example initiatives:</p><ul><li><a href="https://www.bcb.gov.br/en/financialstability/open_finance">Brazil’s Open Finance Initiative</a></li><li><a href="https://treasury.gov.au/consultation/c2023-434434-expansion">Australia’s Consumer Data Rights (CDR) framework</a>, expanding beyond banking into non-bank lending sectors such as energy and telecommunications.</li></ul><h3>The Importance of Modernizing FinTech with OB and OF</h3><p>The technology landscape is evolving at breakneck speed, and the FinTech sector cannot afford to remain isolated in data silos. Open APIs and standardized data exchange offer significant advantages, such as streamlined operations, reduced reliance on intermediaries, and faster cross-border settlements. Regulatory frameworks like PSD2 in Europe empower third parties to initiate payments directly, broadening the range of services banks can offer.</p><p>In essence, open APIs and standardized interfaces support a more dynamic, interconnected financial ecosystem. They enable detailed data analytics that can lead to new revenue streams and enhanced customer experiences.</p><p>Therefore, the FinTech sector cannot stay behind with its data silos and still meet consumers’ growing demands and bring new revenue streams. They have to make a choice whether to be modernized and interconnected with the financial ecosystem and generate more revenue streams or be isolated and only provide core banking or core financial services.</p><h3>Open Data Initiatives in Other Sectors</h3><p>Open data initiatives are not limited to banking and finance. They extend to other industries, such as energy, utilities, and telecommunications. Known variously as “open data” or “smart data,” these efforts aim to integrate data from multiple sectors to create a more holistic and user-friendly environment.</p><p>In Australia, for example, the CDR also applies to energy and telecom providers. The UK has proposed smart data legislation to unify data-sharing standards across sectors.</p><h3>Evolvements, Enforcement, and Emerging Standards in OB and OF</h3><p>Nations worldwide are introducing regulations and frameworks to encourage Open Banking and Open Finance.<a href="https://www.ecb.europa.eu/press/intro/mip-online/2018/html/1803_revisedpsd.en.html"> In the EU, PSD2</a> provides a blueprint for secure data exchange and third-party service integration. Elsewhere, groups like the<a href="https://financialdataexchange.org/"> Financial Data Exchange (FDX)</a> are setting industry standards, while the U.S. gradually moves toward Open Banking practices to enhance consumer control over financial data.</p><h4>U.S. Context on Personal Finance Data Rights</h4><p>In the U.S., the Consumer Financial Protection Bureau (CFPB) has proposed rules that would require financial data providers to offer secure, fee-free access to consumer data. Screen scraping, a common but less secure form of data access would be prohibited. The CFPB’s approach stops short of mandating a specific technical standard but establishes a process for recognizing standard-setting organizations. Today, FDX is the first applicant seeking recognition under this framework, signaling the country’s slow but steady shift toward formalized Open Finance guidelines.</p><h4>Latest Mandates in the FinTech Sector</h4><p>Consider<a href="https://www.swift.com/"> SWIFT</a>’s mandate to fully transition to the ISO 20022 messaging standard by November 2025. SWIFT, the global backbone for secure financial messaging, is pushing for a richer, more standardized data format. ISO 20022’s structured data model can seamlessly support Open Banking APIs. By enriching the quality of financial data, ISO 20022 enables better analytics, personalization, and decision-making for both customers and third-party providers.</p><p>This unified standard makes it simpler for third parties to connect with multiple institutions using consistent formats. Coupled with Open Banking and Open Finance initiatives, the ISO 20022 rollout can catalyze a new wave of integrated, innovative financial services. Financial institutions unwilling or unable to adapt risk being left behind, especially as international payments and broader ecosystem connectivity become table stakes.</p><p>Therefore this latest mandate that requires the full transition by November 2025 is a shred of good evidence to showcase that OB and OF regulations, and frameworks are becoming more and more mandates, not choices in the upcoming future.</p><h3>Conclusion</h3><p>In today’s rapidly evolving financial ecosystem, FinTech is indeed being compelled to modernize without getting isolated in data silos. Open Banking and Open Finance drive this transformation by creating a secure, data-rich environment where innovation flourishes and customer-centric solutions thrive. With frameworks like PSD2, FDX, and CFPB rules accelerating open data access and industry mandates such as ISO 20022 improving data quality, financial institutions face a clear mandate: embrace modernization or risk obsolescence. Moreover, it will expand beyond the FinTech sector with Open Data initiatives and extend to other industries, such as energy, utilities, and telecommunications.</p><p>The future belongs to those who leverage open frameworks, adopt international standards, and meet consumers’ growing demands for control, transparency, and personalized experiences. The time for FinTech firms to act is now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9aac67870d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/how-open-banking-and-open-finance-are-driving-the-next-wave-of-fintech-innovation-b9aac67870d9">How Open Banking and Open Finance Are Driving the Next Wave of FinTech Innovation</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Experiencing the Cultural Japanese Lifestyle in Hakone]]></title>
            <link>https://erandiganepola.medium.com/experiencing-the-cultural-japanese-lifestyle-in-hakone-009fcaca36aa?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/009fcaca36aa</guid>
            <category><![CDATA[ryokan]]></category>
            <category><![CDATA[hot-springs]]></category>
            <category><![CDATA[japan]]></category>
            <category><![CDATA[japanese-culture]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Sun, 06 Oct 2024 11:31:06 GMT</pubDate>
            <atom:updated>2024-10-07T02:45:27.185Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>A Sip of Fine Japanese Rice Wine</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Db2bRzeHvSXQW782xN4uDQ.jpeg" /></figure><p>I recently had the chance to visit Japan, and one of the highlights of my trip was experiencing the authentic Japanese lifestyle in a ryokan in a charming town called Hakone. Nestled in the mountains west of Tokyo, Hakone is known for its hot spring resorts (ryokans), attractive atmosphere, and stunning views of Mount Fuji. Eager to immerse myself in the local culture, I decided that staying in a traditional ryokan was the perfect way to do it.</p><p><strong>The Ryokan Experience</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cpK-qmUqRlNJUwe3HdKxEg.jpeg" /></figure><p>I chose to stay in a small, old-fashioned ryokan — a traditional Japanese inn. These places are a wonderful blend of cultural heritage and hospitality. The ryokan was mostly made out of wood and bamboo, giving it a warm and inviting atmosphere. Inside, the furniture was minimalistic but thoughtful. Low tables and floor seating on tatami mats (woven straw mats) made the space feel cozy and intimate. It was fascinating to see how the Japanese made efficient use of space with such simplicity.</p><p><strong>Sacred Onsens</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zgs0QeScYmRdT39V0WyZ_w.jpeg" /></figure><p><strong>Did you know that, </strong>in Japanese culture, onsens are considered sacred places? Historically, nobles and warriors would discuss important matters in these baths, believing the holy environment ensured respect and safety.</p><p>One of the most unique aspects of staying in a ryokan is access to the onsen (hot spring baths).</p><p>There are some customs to be aware of when visiting an onsen:</p><ul><li><strong>Tattoos:</strong> Traditionally, tattoos have been associated with organized crime in Japan, so usually public onsens might not allow guests with tattoos. But private onsens do allow.</li><li><strong>Etiquette:</strong> You’re expected to bathe nude and wash thoroughly before entering the hot springs.</li><li><strong>Health Benefits:</strong> The warm mineral-rich waters are believed to offer various health benefits.</li></ul><p>Embracing these customs, I found the onsen experience to be incredibly relaxing and rejuvenating. Especially when I had it in the early morning hours in the public onsen blended with nature.</p><p><strong>Delicious Japanese Food</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HniGy9gqSJzs52cIVZcgLg.jpeg" /><figcaption>A course menu of a dinner served.</figcaption></figure><p>Traditional Ryokans are a good place to try authentic Japanese cuisine.</p><p>Japanese cuisine often focuses on preserving the natural flavors and nutrients of the ingredients. This means dishes like sushi and sashimi feature fresh, raw fish — which, to my surprise, I enjoyed immensely.</p><p>I also tried rice wine, known as sake, which was a perfect start to the meal. It’s made from fermented rice and often produced locally. The meals were balanced, with small portions of rice eaten with chopsticks, accompanied by a variety of dishes featuring fish, meat, and vegetables. Each dish was presented beautifully, almost like a work of art.</p><p><strong>Zen Gardens</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZgRuhXO_elO_zFN4eGJC0A.jpeg" /></figure><p>Another peaceful aspect of the Ryokans usually is the Zen gardens. These gardens embrace the idea of accepting nature as it is, creating a serene environment that’s perfect for reflection. I spent some time strolling through the garden, absorbing the simplicity that it offered.</p><p><strong>Exploring Hakone</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-0oVEPXFQsZqgH3zjPo0-g.png" /><figcaption>Hakone attractions — Refer <a href="https://www.odakyu.jp/wordpress/wp-content/uploads/HFP_English_4P_230322outlineW.pdf">https://www.odakyu.jp/wordpress/wp-content/uploads/HFP_English_4P_230322outlineW.pdf</a></figcaption></figure><p>While the ryokan itself was a haven of peace, the town of Hakone had its own charms waiting to be explored. Hakone has so much to offer beyond the ryokan and onsens. The town is surrounded by natural beauty, including views of Mount Fuji and access to inactive volcanoes. I visited local artisan shops where I saw pottery and glassmaking — a chance to see traditional crafts still alive today and we even could practice it with our own hands.</p><p>There are also several museums in Hakone, like the Hakone Open-Air Museum, which combines art with nature in a beautiful outdoor setting. Each place added a new layer to my understanding and appreciation of Japanese culture.</p><p><strong>Final Thoughts</strong></p><p>Visiting Japan had always been a dream of mine, and Hakone provided an unforgettable experience. From the bustling energy of Tokyo to the tranquil beauty of Hakone, Japan is a country of contrasts that harmoniously coexist. If you’re planning a trip, I highly recommend experiencing the traditional Japanese lifestyle — it’s an experience you won’t forget!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=009fcaca36aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Large-Scale Systems: Building Blocks]]></title>
            <link>https://erandiganepola.medium.com/designing-large-scale-systems-building-blocks-e994d3548925?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e994d3548925</guid>
            <category><![CDATA[large-scale-projects]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[architecture-components]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Mon, 26 Aug 2024 07:12:08 GMT</pubDate>
            <atom:updated>2024-08-26T09:59:11.913Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>The Art of Scaling: Crafting Large-Scale Systems for Tomorrow’s Challenges</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1fQRYKbVbkP8J2uw40sKiA.png" /><figcaption>FigureI-Building blocks of a large-scale system</figcaption></figure><p>Today’s large-scale systems must be robust enough to handle increasing demand, flexible enough to adapt to changing requirements, and resilient enough to recover from failures. This article will explore five critical components that form the backbone of such architectures:</p><ul><li>Data Storages</li><li>Services</li><li>API Layer</li><li>Security</li><li>Observability</li></ul><p>Each of these elements is pivotal in constructing a resilient and scalable system capable of supporting modern business needs.</p><p>Let’s begin our discussion with the Data Storage component, depicted on the right side of the above image (<em>Figure I</em>).</p><h3>Data Storages</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wxToZhCnrNdtLJ9TeuRgvg.png" /><figcaption>Figure II</figcaption></figure><p>Every business relies on data, whether it’s customer information, internal stakeholder information, transaction records, or operational metrics. This data must not only be securely stored but also made accessible to various teams across the organization and potentially to external partners or applications.</p><p>Data storages act as the system of record where all necessary information resides. One or more data storage solutions will be used in any system and proper data storage solutions ensure that this information is readily available, consistent, and reliable.</p><p>In large-scale systems, data storage isn’t just about where data is kept; it’s about how data is structured, accessed, and managed across different layers of the system. The complexity and volume of data decide the choice of storage solutions, which can vary significantly based on the use case.</p><p>Let’s discuss some of the most widely used data storage options:</p><h4><strong>Databases</strong></h4><p>This is the most commonly used method for many years. Databases can be categorized into Relational and Non-relational database types.</p><ul><li><strong>Relational databases</strong> like MySQL and PostgreSQL offer structured storage with ACID (Atomicity, Consistency, Isolation, Durability) properties, making them ideal for transactions and complex queries.</li><li><strong>Non-relational/NoSQL databases</strong> like MongoDB and Cassandra are designed to handle large volumes of unstructured or semi-structured data, offering greater flexibility and horizontal scalability.</li></ul><p>The choice between these options depends on factors such as data structure, the need for scalability, query/operation complexity, and the nature of the workload.</p><p>As an example; if we consider an “E-commerce platform” where managing user data, orders, product inventories, and supplier information are important, relational databases excel in handling transactions like order placements and payments, where data integrity and consistency are critical. On the other hand, a system like a “Social Media platform”, that needs to store user posts, comments, media files, and social graphs (who follows whom) requires rapid read access. Also, write access does not necessarily fit into a fixed schema. In this kind of system, a non-relational database would be ideal.</p><h4><strong>Data Sources</strong></h4><p>Beyond traditional databases, large-scale systems often need to interact with a variety of data sources. These can include:</p><ul><li>External APIs, such as REST, GraphQL or SOAP API types, allow systems to interact with third-party services.</li><li>File systems, managed via protocols like NFS or SMB, handle data storage and retrieval across networks.</li><li>Message queues like Kafka, RabbitMQ, and ActiveMQ facilitate reliable message exchange using protocols such as AMQP, MQTT, and JMS, enabling asynchronous communication essential for decoupling processing tasks from the main application flow.</li><li>Data streams, processed by technologies like Apache Spark and Flink, support real-time data processing, crucial for applications requiring immediate insights.</li></ul><p>These integrations require a strong architectural framework to ensure data consistency and system reliability, employing transactional mechanisms and data synchronization to maintain the integrity and smooth operation of the system.</p><h4><strong>SaaS Systems</strong></h4><p>Modern enterprises increasingly rely on Software as a Service (SaaS) platforms like Salesforce for Customer Relationship Management (CRM), SAP for Enterprise Resource Planning (ERP), QuickBooks for automating invoicing &amp; expenses, and Microsoft Power BI for Business Intelligence (BI) to manage specific business functions. These systems not only store critical business data but also offer advanced tools for processing and analyzing this data.</p><p>Integrating these SaaS systems with your primary data storage solutions necessitates secure and efficient data exchange mechanisms. This ensures that data flows seamlessly between on-premises systems and cloud-based SaaS platforms. For example, integrating Salesforce with on-premises databases might involve using web service APIs and middleware platforms/integration services to ensure secure data synchronization and real-time data availability across systems.</p><p><strong>In summary:</strong> Choosing the right data storage solution is critical, as it impacts the system’s performance, scalability, and overall efficiency. It’s not just about storing data but also about how quickly and reliably that data can be retrieved, updated, and processed to support various business functions.</p><p>In the next sections, we will explore how the other components interact with data storage to create a large-scale system.</p><h3>Services</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lEhB6MLSMIU4_lbUuaCoJw.png" /><figcaption><em>Figure III</em></figcaption></figure><p>At the heart of any large-scale system are the backend services. These services connect with the data storages we discussed in previous section.</p><p>Traditionally, systems were built using a monolithic architecture, where all functionalities were tightly coupled into a single, large codebase. While this approach was manageable for smaller applications, it quickly became a bottleneck as systems grew in complexity and scale.</p><p>To address these challenges, Service-Oriented Architecture (SOA) emerged, promoting the decomposition of the monolith into smaller, more manageable services. These services, often referred to as microservices in modern architectures, are independent, self-contained units that perform specific business functions. Microservices communicate with each other through well-defined APIs, making it easier to scale, deploy, and maintain the system.</p><p>As shown in <em>Figure III,</em> Integration services play a crucial role in this architecture. They facilitate communication between different systems and other microservices, allowing them to work together seamlessly. Whether it’s integrating legacy systems with modern applications or connecting various domain-specific microservices, these integration services ensure that data flows smoothly across the system.</p><p><strong>More information</strong> — <a href="https://github.com/wso2/reference-architecture/blob/master/api-driven-microservice-architecture.md">This WSO2&#39;s Reference Architecture paper on “API-driven Microservice Architecture”</a> is a great read on the layered approach for an API-driven Micro Services Architecture.</p><h3>API Layer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*SGUSgsAVC-Ked4fcwqjuZA.png" /><figcaption>Figure IV</figcaption></figure><p>The API layer serves as the critical interface between users and backend services. It allows the organization’s internal or external applications to interact with the system through a standardized interface.</p><p><strong>More Information:</strong> This API layer is pivotal in an API-driven architecture. Refer to my previous <a href="https://medium.com/@erandiganepola/designing-large-scale-systems-api-first-approach-with-real-world-examples-a0bad0220d16">article on the API-first approach</a> to understand different API types and how API-driven architecture can help building large-scale systems.</p><p>The API layer typically consists of the following components:</p><ul><li><strong>API Creation:</strong> The process of designing and building APIs that expose the functionalities of backend services to external consumers. This involves defining endpoints, request/response formats, handling errors, configuring throttling limits, security, etc.</li><li><strong>API Gateway:</strong> A critical component that manages API traffic, routing requests to the appropriate backend services, while enforcing security protocols like OAuth2 and SSL/TLS. It also manages cross-cutting concerns such as rate limiting, logging, monitoring, and caching. This is the component that we can scale according to the traffic requirements.</li><li><strong>API Lifecycle Management:</strong> This involves the complete lifecycle of an API, from planning and design to deployment, versioning, and deprecation. Proper lifecycle management ensures that APIs remain functional, secure, and up-to-date with evolving business needs.</li><li><strong>API Marketplace:</strong> An API marketplace is a centralized platform where APIs are published and made available to developers, partners, and third-party vendors. It provides a marketplace experience where consumers can discover, subscribe to, and consume APIs, often with integrated monetization and analytics features.</li></ul><p>Together, these components form a cohesive API layer that addresses the need for external interactions with the system’s backend and scaling the infrastructure to meet growing and evolving digital demands.</p><h3>Security: Authentication &amp; Authorization</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*rQalr9jfSWdDRFcrXc67kg.png" /><figcaption>Figure V</figcaption></figure><p>Security is paramount in any large-scale system, particularly in the context of APIs and services. Therefore security comes into the picture mainly in API layer and Services layer, ensuring that only authorized users and applications can access sensitive data and functionalities.</p><p>This is where widely used OAuth2 and access control mechanisms come into play.</p><p>Refer to <a href="https://auth0.com/intro-to-iam/what-is-oauth-2">this article</a> to understand more about OAuth2.</p><ul><li><strong>OAuth2:</strong> A widely used protocol for securing APIs by providing a standardized way to authenticate users and authorize applications. OAuth2 allows third-party applications to access resources on behalf of a user without exposing their credentials.</li><li><strong>Access Control:</strong> This involves defining who can access what within the system. Access control can be enforced at various levels, including user authentication (verifying the user’s identity) and authorization (determining what the authenticated user is allowed to do).</li><li><strong>Scopes:</strong> In OAuth2, scopes define the specific permissions that an application has when accessing an API. For example, an application may have read-only access to a user’s profile information but not write access.</li></ul><p>Securing your APIs and services with widely used mechanisms such as OAuth2 is fundamental and crucial. Therefore this is supported by almost all the all the vendors or technologies you can use for the API layer and services layer.</p><h3>Observability</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*Nl9DYZbBhbWIYj6kMtjmgA.png" /><figcaption>Figure VI</figcaption></figure><p>In large-scale systems, observability is critical for maintaining system health, diagnosing issues, and optimizing performance. Observability is a broad concept that includes monitoring, analytics, and the ability to understand the internal state of a system from its external outputs.</p><ul><li><strong>Monitoring:</strong> This critical component involves the continuous tracking of system performance and health. Utilizing tools like <a href="https://www.elastic.co/elastic-stack">ELK Stack</a> (Elasticsearch, Logstash, Kibana) or <a href="https://www.datadoghq.com/monitoring/full-stack-monitoring/">DataDog</a>, operators can obtain real-time insights into usage metrics, system health, and potential anomalies. These tools facilitate prompt detection, visualizing in graphs, response to operational issues by setting alerts, etc. Thereby crucial for minimizing downtime and enhancing service reliability.</li><li><strong>Analytics:</strong> Deeper analysis of collected data through platforms like <a href="https://marketingplatform.google.com/about/analytics/">Google Analytics</a> or <a href="https://www.splunk.com/">Splunk</a> enables the identification of patterns, forecasting of trends, and data-driven decision-making. This analysis provides valuable insights into system performance, user behavior, and operational efficiencies, which are essential for strategic planning and system optimization.</li><li><strong>Tracing and Diagnostics:</strong> Tools like <a href="https://www.jaegertracing.io/">Jaeger</a> and <a href="https://zipkin.io/">Zipkin</a> offer distributed tracing capabilities, which are crucial for diagnosing complex issues within microservices architectures. They help in pinpointing failures or bottlenecks by tracking the full lifecycle of a request and visualizing trace data, which represents the flow of requests through various system components.</li><li><strong>Logging:</strong> Effective logging strategies are implemented using tools such as <a href="https://logging.apache.org/log4j/2.x/">Log4j2</a> or <a href="https://www.fluentd.org/">Fluentd</a>, ensuring comprehensive log management and analysis, which is vital for troubleshooting and understanding system behavior over time.</li></ul><p>Overall, the observability of a system integrates these elements to provide a holistic view of its operations. These practices are essential for managing the performance, reliability, and operational efficiency of large-scale systems.</p><p>Now that we have covered the building blocks of a large-scale system, let&#39;s wrap up the discussion with a conclusion.</p><h3>Conclusion</h3><p>Designing large-scale systems requires a holistic approach that considers various building blocks. By focusing on the key areas of Data Storage, Services, API Layer, Security, and Observability, you can create a system that is scalable, secure, and reliable. Each of these components plays a critical role in ensuring that your system can handle the demands of modern business environments while providing a seamless experience for users.</p><p>That’s it for today’s article. Hope to see you soon with the next article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e994d3548925" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Large-Scale Systems: API-First Approach with Real-World Examples]]></title>
            <link>https://medium.com/swlh/designing-large-scale-systems-api-first-approach-with-real-world-examples-a0bad0220d16?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0bad0220d16</guid>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[architecture-design]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[api-first]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Mon, 22 Jul 2024 05:45:06 GMT</pubDate>
            <atom:updated>2024-07-29T03:44:50.093Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>The Art of Scaling: Crafting Large-Scale Systems for Tomorrow’s Challenges</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DHkUbz7NbiHhHnCFIWlaFg.png" /></figure><h3><strong>The Power of APIs in Building Large-Scale Systems</strong></h3><p>Technology empowers us to solve problems, both internal to an organization (such as managing financial data for streamlined auditing and budgeting) and client-facing (such as providing essential services). At the heart of any organization lies a system of records that reflects its core business operations. As well as to function effectively and to grow, businesses need functionalities to add, read, update, and delete this data. Exposing this data securely and manageably, while adhering to compliance regulations, is crucial nowadays.</p><p>Therefore, today let’s discuss building large-scale systems to address business problems by following an API-first approach.</p><h3>APIs as the Glue of Modern Systems</h3><p>APIs (Application Programming Interfaces) act as interfaces, providing controlled access to data and functionalities. APIs are typically a part of the Application Layer in a software solution.</p><p>Traditionally, enterprise applications were monolithic, with all functionalities residing in a single unit. The need for communication between these applications led to the development of APIs and services. As the need for scalability arose, monolithic applications were deconstructed into smaller, independent microservices. These microservices, built around specific business capabilities, communicate with each other using lightweight mechanisms like APIs. Microservices offer several advantages: independent deployment, diverse programming languages and data storage technologies, and minimal centralized management.</p><p>While internal stakeholders understand the data and system capabilities, clients need functionalities. Traditionally, clients had to wait for internal teams to build backend systems and define interfaces before building client-side applications, creating a time-consuming dependency. This is where the API-first approach comes into play.</p><h3>API Layers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*R8U0mNs1J53wz7jikpD4Fg.png" /></figure><p>APIs can be categorized into two layers as Domain APIs and Experience APIs.</p><p><strong>Domain APIs</strong> are most likely internal APIs built for a specific domain rather than for generic serving. They unlock data from the relevant domain’s core systems of record within an organization. Examples of critical systems that APIs could unlock data from include ERP systems, health care records, billing systems, etc.</p><p><strong>Experience APIs</strong> provide a business context for the data and processes that were unlocked and established with domain APIs. It integrates different systems such as ERPs and billing systems and dp transition among different systems. Through experience APIs, we can build and expose necessary responses for its intended business audience such as mobile applications users, web portals, etc.</p><p>Next, let’s take a real-world example and discuss API-first approach further.</p><h3>Real-World Use Case: Food Service Solution Provider API-First Integration</h3><h4>Background</h4><p>Widely known global food service solution providers such as <a href="https://www.compass-usa.com/">Compass Group</a>, <a href="http://www.mcdonalds.com/">McDonald’s Corporation</a>, and <a href="https://www.aramark.com/home">Aramark</a> offer comprehensive data management and analytics tools for manufacturers, distributors, and operators in the food service industry. They aim to streamline operations, optimize pricing strategies, and enhance sales performance. Let’s take a use case for a similar food service, a medium-scale food service solution provider for this example. Let’s name the business as “<strong>MealNetwork</strong>”.</p><h4>Problem Statement</h4><p>MealNetwork needs to integrate multiple ERP systems used by different stakeholders (manufacturers, distributors, internal and external operators) to allow real-time data sharing, and processing and expose them to different internal and external stakeholders. The system needs to be scalable with the growth of the business.</p><h4>Proposed API-First Solution</h4><p>To overcome this challenge, the company needs to adopt an API-first approach, creating a unified API layer that serves as the backbone for all data interactions between different ERPs and other internal/external systems. This approach ensures a more scalable, flexible, and efficient system. In this medium-scale business, we will combine both domain APIs layer and experience APIs layer and have one single API layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iqeHox-SuGdwwL9GrcOH-A.png" /><figcaption>High-level API-first solution diagram for MealNetwork</figcaption></figure><p>As shown in the above diagram, this solution will have three layers as discussed below:</p><p><strong>API Layer:</strong></p><ul><li><strong>Unified API Interface:</strong> We can develop a RESTful API layer that abstracts the underlying complexities of each internal/external system. This API layer will provide standardized endpoints for common data operations such as retrieval, insertion, update, and deletion for both internal and external users/applications.</li><li><strong>Security and Authentication:</strong> Security is a key for APIs. We need to implement OAuth for secure access and add throttle limits for API consumption ensuring that only authorized applications and users can interact with the APIs within allowed limits.</li><li><strong>API Tools</strong>: API development can be done through API tools and there are different vendors who support this.</li><li><strong>API Marketplace</strong>: Once developed, API can be available in API marketplaces to explore and discover by internal and external users. Next users can subscribe to APIs for consumption.</li><li><strong>API Gateway</strong>: APIs will be exposed to internal or external users to consume via API gateways.</li></ul><p><strong>Integration/Service Layer:</strong></p><ul><li>APIs residing in the API gateway will call to the integration layer for different operations such as data transformation, sync data with DBs, and read and write data on external/internal systems.</li><li><strong>Integrator:</strong> Behind the API, we need to have a data transformation engine that converts data into the required formats without manual intervention. This engine will handle all necessary mappings and transformations, ensuring data consistency. Many integration vendors support this.</li><li><strong>Bidirectional Synchronization:</strong> We need to enable bidirectional communication between ERPs, allowing real-time data updates. If data is updated in one ERP, the integration layer will propagate changes across all connected systems.</li><li><strong>Event-Driven Architecture:</strong> We can utilize an event-driven architecture to trigger updates in real time. For example, when a new pricing strategy is approved in one ERP, it is immediately reflected in the others, ensuring all parties have up-to-date information.</li></ul><p><strong>Internal/External Systems:</strong></p><ul><li>Integrator will connect with different internal or external systems such as different ERP systems, databases, SFTP locations, SaaS services, etc.</li></ul><p><strong>With the API-first approach, we can first build the API contract and share that with both internal/external users and internal system developers/integration layer developers. Adhering to that contract both parties can start developing this entire system in parallel.</strong></p><h3>Pros and Cons of the API-first Approach</h3><p>Now let’s discuss more about pros and cons of this approach.</p><h4>Pros</h4><ul><li>Avoids frequent iterative changes</li></ul><p>Designing the API layer first by understanding the end-to-end business use case and how frontend and backend applications can communicate in the best possible approach will avoid frequent iterative changes in the development and overall solution. It will further prevent going back and forth on change requests once actual development starts. This saves lots of time and money from a business standpoint. That is why it’s best to design the API first rather than doing it in the actual development phase like in the old days.</p><ul><li>Teams can work in parallel</li></ul><p>API contracts will be written from an API description language which will be a standard other parties can refer to. Once all the stakeholders agree to the contract written, multiple teams can start the work in parallel. As an example, the backend engineering team that develops the integration services and the frontend engineering team that develops the UIs can both refer to the contract and work in parallel. Mock API backends that are easily built using tools, can be used for parallel development and testing rather than waiting on actual backends to be available.</p><ul><li>Enhances developer experience</li></ul><p>Since API contracts are written in a standard that can be used to generate SDKs, clients can rely on existing tools for development without an issue. This allows developers to enhance their understanding of the overall context and quickly start the development work.</p><ul><li>Clearly define and communicate deliverables</li></ul><p>All the parties involved can be clearly communicated the scope of work and deliverables and get agreed to that before proceeding to the actual implementation via API contract. This will be beneficial to the overall business to plan time, resources, and money.</p><h4>Cons</h4><p>There are very few drawbacks to the API-first approach. Those are:</p><ul><li>Taking the API-first approach requires having an understanding of the big picture of the business requirement as well as some nitty-gritty details in software development, such as data structures and types. Developers will also be unable to figure out edge use cases or tiny details that impact the API structure since actual development hasn’t started.</li><li>If developers identify changes once actual development starts, we need to revisit the API design and correct it accordingly.</li><li>Developers might not be familiar with the development process of this approach, where they have to depend on a contract or mock backend while doing the actual development.</li></ul><p>Despite the minor tradeoffs, following an API-first approach will provide immense help in solving business problems.</p><p>Now let’s see what are the modern-day popular API types that we can use in the API layer.</p><h3>Introduction to Modern-Day API Types</h3><p>According to Postman’s State of the API 2023 report (<a href="https://www.postman.com/state-of-api/api-technologies/">https://www.postman.com/state-of-api/api-technologies/</a>), some of the widely used API architectural styles are as follows in the descending order:</p><ol><li>REST<br>REST (stands for REpresentational State Transfer) is a standard. This allows clients to make API requests using HTTP methods such as GET, POST, DELETE, etc. REST supports a wide range of data formats such as JSON, XML, and Plain-text making it flexible as well as scalable.</li><li>Webhooks<br>Webhooks are HTTP-based, event-driven mechanisms for communication between two interested parties. A webhook can be used to send data whenever a new event occurs. It’s simply a one-way data transmitter.<br>As an example, you have subscribed to a new email list and want updates whenever you get a new email. A webhook can transmit this data, saving you the time, effort, and energy of making a query without making unnecessary API calls while data hasn’t been changed.</li><li>GraphQL<br>GraphQL is a query language and server-side runtime for APIs. GraphQL APIs allow clients to retrieve precisely the data they need by issuing specific queries. It also allows you to modify (mutate) server-side data.</li><li>SOAP<br>SOAP is a protocol used to create web APIs based on XML (Extensible Markup Language). SOAP usually contains a large file format due to the verbose XML structure. However, SOAP is not inherently designed to be flexible or customizable, which has slowed down its usage and adoption nowadays.</li><li>WebSockets<br>WebSocket API makes it possible to open a full-duplex/two-way interactive communication session between the client and a server over a TCP connection. With WebSockets, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.</li><li>gRPC<br>gRPC follows the RPC (Remote Procedure Call) framework to build scalable and fast APIs. It allows a program in one location to pass data to a distinct function in another program at another location.</li></ol><p>Next, let’s catch upon on general API best practices as well.</p><h3>General Best Practices</h3><ul><li><strong>Encapsulation and Abstraction</strong>: APIs should encapsulate their internal workings, meaning that users need not understand or be aware of the backend processes. This abstraction allows users to interact with the services without needing to navigate the complexities of the underlying systems.</li><li><strong>Decoupling and Independence</strong>: APIs should be decoupled from the systems they interact with. This separation ensures that changes to the system internals can be made without affecting the user’s interaction with the API. Although achieving full decoupling can be challenging, implementing versioning helps manage changes effectively.</li><li><strong>Intuitive Design and Naming Conventions</strong>: APIs should use meaningful and clear names for endpoints, methods, and parameters, which helps developers understand functionality without constantly referring to documentation.</li><li><strong>Efficient Data Handling</strong>: Incorporate best practices like pagination, idempotency, and asynchronous operations to handle data efficiently. Pagination helps manage large datasets by dividing them into smaller, manageable chunks. Idempotency ensures that a request can be repeated without changing the result, which is crucial for reliable communication. Asynchronous operations are essential for time-consuming tasks, improving the responsiveness of your API.</li><li><strong>Versioning and Compatibility</strong>: Proper versioning of APIs is crucial. Introducing backward-compatible changes allows clients to continue using the API without disruption. Major version changes, which might include breaking changes like modifications to the request-response structure, should be clearly distinguished (e.g., moving from API 1.0 to API 2.0). Minor changes, such as updates to documentation or non-breaking adjustments, can be released as sub-versions (e.g., API 1.1).</li></ul><p>By adhering to these practices, we can ensure that the APIs are robust, user-friendly, and adaptable to future changes.</p><h3>Implement, Secure, Test, Publish for Discovery and Manage Life Cycle</h3><p>We can utilize the Open API Specification (<a href="https://swagger.io/specification/">OAS</a>, formerly known as Swagger) to create a machine-readable interface/API contract for your APIs. This specification serves as the contract between the API and its consumers. You can implement the actual API backend in any programming language of your choice.</p><p>For testing, tools like Postman, Swagger UI, and cURL are essential to ensure your API functions as intended.</p><p>Once tested, publish your API to an API marketplace to facilitate discovery by potential users. Security is paramount — ensure secure communication both from the user to the API and from the API to the backend.</p><p>Managing the API lifecycle is crucial. This involves creating the API, making it available to users, introducing new versions, and eventually retiring and removing outdated versions.</p><p>For API management there are many vendors who support full API lifecycle management. As an example, Open Source software, <a href="https://apim.docs.wso2.com/en/latest/">WSO2 API Manager (APIM)</a> is a robust tool that can handle tasks such as API development, securing the API, proxying the backend API, modifying payloads, rate limiting, monetization, and full API lifecycle.</p><h3>Resources</h3><p>Read the detailed guide on the API-First Approach from my <a href="https://a.co/d/dfY4c3q">e-book published on Amazon</a>.</p><ul><li>“<a href="https://a.co/d/dfY4c3q">Getting Started with API-First Approach</a> : A Hands-On Guide with Real-World Examples”</li></ul><p>With that let’s conclude today’s discussion.</p><h3>Conclusion</h3><p>In this article, we covered the importance of following an API-first approach when building large-scale systems. How to do it through real-world examples, the pros and cons of the API-first approach, best practices of API designing, and more about main API types and API management.</p><p>Let’s meet soon for our next discussion on “Designing Large-Scale Systems”.</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0bad0220d16" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/designing-large-scale-systems-api-first-approach-with-real-world-examples-a0bad0220d16">Designing Large-Scale Systems: API-First Approach with Real-World Examples</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Large-Scale Systems: Quality Attributes and System Requirements]]></title>
            <link>https://erandiganepola.medium.com/designing-large-scale-systems-quality-attributes-and-system-requirements-56276d324bd6?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/56276d324bd6</guid>
            <category><![CDATA[requirement-analysis]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[fault-tolerance]]></category>
            <category><![CDATA[architecture-design]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Fri, 12 Jul 2024 08:09:13 GMT</pubDate>
            <atom:updated>2024-07-12T08:27:29.096Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>The Art of Scaling: Crafting Large-Scale Systems for Tomorrow’s Challenges</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZEvR3O2ulvh_YQGm0SY94Q.png" /><figcaption>“YouTube Availability” | <a href="https://commons.wikimedia.org/wiki/File:YouTube_Availability_2021.png">Wikimedia Commons</a> | Creative Commons <a href="https://creativecommons.org/licenses/by-sa/4.0">License details</a></figcaption></figure><h3>Welcome to the article series on “Designing Large-Scale Systems”</h3><p>Throughout this series, we will discuss complex world of architectural strategies and design principles essential for building systems that operate on a massive scale. Each article will not only cover fundamental and advanced concepts but will also illuminate these ideas with real-world examples. This article series will help you to meet today’s demanding business requirements and scale dynamically for the challenges of tomorrow.</p><p>Expect more cool stuff to come!</p><h3>Introduction to Quality Attributes and System Requirements</h3><p>In today’s digital world, businesses face complex challenges that demand robust, large-scale systems supporting large user bases and complex functionalities. Unlike simpler applications tailored for a limited audience or simple use cases, these systems contain many applications or software that work together and must reliably serve millions of users. Also, some systems must cater to mission-critical operations where human lives and essential services depend on their uninterrupted function. Therefore the architectural design of such systems is not just about scaling to meet user demands but also about ensuring the resilience, security, and efficiency that modern enterprises require.</p><p>From this article, we will discuss various system requirements, the key quality attributes to consider during the design phase, and how service levels are quantitatively measured to ensure that these systems not only function effectively but also thrive under the pressures of high-demand business scenarios.</p><p>So let’s get started.</p><h3><strong>Functional and Non-Functional Requirements</strong></h3><p>Before start designing a large-scale system, we need to understand for what and why we are building it. Who will be the users, the expected traffic, and the growth of traffic over the years also need to be considered.</p><p>Therefore as the first step, we need to gather functional and non-functional requirements. This initial phase can be tricky because users might not articulate what they want properly, and requirements are subject to evolve. Yet, a comprehensive initial gathering is crucial.</p><p>Requirements come in three flavors:</p><ul><li><strong>Functional Requirements (Features):</strong> These are the system’s core capabilities, the actions it must perform and the services it must deliver.</li><li><strong>Non-Functional Requirements (Quality Attributes):</strong> These define the system’s quality standards, and aspects like usability, performance, reliability, and scalability.</li><li><strong>System Constraints (Boundaries):</strong> These are the limitations within which the system must operate, like budget, deadlines, and available resources to build the system.</li></ul><p>Now let’s discuss more about functional and non-functional requirements.</p><h3><strong>Gathering Functional Requirements</strong></h3><p>Effective functional requirement gathering is a science. Often, clients may not have a deep understanding of the technical specifications about their needs. However, they are usually able to articulate their day-to-day operations and future business objectives. To capture these requirements effectively, translating business use cases and user flows into technical specifications is a highly practical method.</p><p>Business use cases allow us to understand the client’s operations and the specific tasks they need the system to perform. Meanwhile, user flows map out the step-by-step processes that users will follow to complete these tasks within the system.</p><h4><strong>Use Cases</strong></h4><p>Even though clients explain use cases more in a business activity in simple terms, theoretically use cases are detailed narratives that describe how users interact with a system to achieve specific goals. They focus on the interaction between the user/client (often referred to as the “actor”) and the system, from a user-centric perspective.</p><ul><li><strong>Written Narrative</strong>: A textual description outlining the steps and interactions.</li><li><strong>Diagrammatic Representation</strong>: Use case diagrams that visually represent the relationships between actors (users of the system) and the use cases in the system, often created using Unified Modeling Language (UML).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q36lHEB3kbHkyXawSBY1nA.png" /><figcaption>Simple Use Case Model for an E-Retail System</figcaption></figure><h4><strong>User Flows</strong></h4><p>User flows are visual representations of the sequence of steps a user takes to complete a task within a system, based on specific use cases. They map out every decision point and action a user undertakes, offering a detailed, step-by-step journey through the system from the user’s perspective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*TNmniJNIWgDHnSV4CyFANw.jpeg" /><figcaption>Example user flow diagram | Creative Commons <a href="https://creativecommons.org/licenses/by-sa/2.5">License details</a> | <a href="https://commons.wikimedia.org/wiki/File:Understanding_First_Day_-_full_user_flow_2018-10-22.jpg">Wikimedia Commons</a></figcaption></figure><p>Using both use cases and user flows together provides a comprehensive view of what the system is supposed to do and how users will interact with it. While use cases provide a deep understanding of the users’ goals and the required system behavior, user flows offer a granular, step-by-step visualization of that interaction.</p><h3><strong>Non-Functional Requirements: Why It Matters</strong></h3><p>Providing system capabilities to address business use cases without the ability to handle required traffic and maintain promised availability is pointless. Because unlike in the past, today’s requirements are complex and in high demand. This is why attributes like scalability and availability are crucial in large-scale systems.</p><p>Often, the need to undertake systems isn’t due to broken functionalities, but because of failures to meet key quality attributes such as:</p><ul><li>Inability to achieve promised uptime (like the 99.99% availability)</li><li>Scalability limitations impact the growth</li><li>Development and maintenance complexities slowing progress</li><li>Security vulnerabilities leaving the system exposed</li></ul><h4><strong>The Pillars of Quality: Critical Attributes for Large-Scale Systems</strong></h4><p>Now, let’s discuss the essential quality attributes that form the pillars of a large-scale system’s success:</p><ol><li><strong>Performance:</strong> This is about speed — measured by response time and system throughput. Think of it as how quickly the system can handle user requests.</li><li><strong>Scalability:</strong> This is the system’s ability to gracefully handle increased loads without performance suffering. It comes in three forms:<br>- <strong>Vertical Scaling:</strong> Expanding the system with more resources such as hardware (CPUs, memory).<br>- <strong>Horizontal Scaling:</strong> Adding more system instances to distribute the workload and handle increasing live traffic.<br>- <strong>Organizational Scalability:</strong> Ensuring the system’s architecture can accommodate growth without major rework.</li><li><strong>Availability:</strong> This is paramount — it directly impacts user experience and business operations. Key metrics include:<br>- Uptime: How much time is the system operational?<br>- Availability Percentage: A measure of uptime relative to total running time (ideally targeting 99.9% or higher).<br>- Mean Time Between Failures (MTBF) and Mean Time to Recovery (MTTR): How often failures occur and how quickly they’re resolved.</li></ol><p>When we are building a large-scale system we need to focus on above discussed functional as well as non-functional requirements.</p><p>Let’s discuss more about handling fault tolerance and building a highly available system.</p><h3><strong>Building Fault Tolerance and High Availability</strong></h3><h4>Fault Tolerance</h4><p>Fault Tolerance is the ability of a system to continue operating properly in the event of a failure even if some of its components are failed. The key aspects of fault tolerance include:</p><ul><li><strong>Redundancy</strong>: Implementing multiple instances of critical components so that if one fails, others can take over without loss of service.<br><em>Ex: Having multiple replicas of the same system. In this way, if the main system fails, we can fall back to the backup.</em></li><li><strong>Error Handling</strong>: Developing systems to detect, report, and handle errors gracefully, without causing a system-wide failure.</li><li><strong>Failover Mechanisms</strong>: Automatic switching to a redundant or standby system, component, or network upon the failure or abnormal termination of the previously active application, server, system, or network.<br><em>Ex: We can define failover endpoints for a system. Say our main system needs to connect to a backend endpoint to get some additional data, then we can make this backend highly available and provide a failover endpoint to our main system to automatically switch to during a failure of the first endpoint.</em></li></ul><h4>High Availability</h4><p>High availability refers to the design and implementation of systems that aim to ensure an agreed level of operational uptime and service performance over a given period. This is often quantified as a percentage, such as “99.99% availability”. Key strategies for achieving high availability include:</p><ul><li><strong>System Redundancy</strong>: Similar to fault tolerance, involves creating redundant instances of systems or components.</li><li><strong>Regular Maintenance</strong>: Scheduled checks and updates to ensure all parts of the system are functioning optimally and to prevent unexpected failures.</li><li><strong>Monitoring</strong>: Continuous monitoring of the system to detect and resolve issues before they cause significant downtime.</li><li><strong>Load Balancing</strong>: Distributing workloads evenly across multiple system resources to ensure no single server or resource is overwhelmed, which can lead to system crashes or performance bottlenecks.</li></ul><p>Redundancy and high availability can be achieved by following below architectures in the systems:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P_0BDU7mSHmRkXB4RqDGwQ.png" /><figcaption>Active-Active pattern Vs. Active-Passive pattern</figcaption></figure><ul><li><strong>Active-Active Architecture:</strong> All replicas are operational, and constantly synchronizing. In this pattern, clients connect to a load balancer that distributes their workloads across multiple active servers.</li><li><strong>Active-Passive Architecture:</strong> In this pattern, clients connect to the main server, which handles the full workload, while a backup server remains on standby, only activating in the event of a failure.</li></ul><p>One thing to notice here is that compared to the Active-Active pattern, the Active-Passive pattern will have a downtime of the system when switching traffic from the main server to the standby server. This downtime can be reduced even to milliseconds with today’s technology, but even this downtime cannot be afforded by some critical systems such as air traffic controllers or health systems.</p><h3>Ensuring Service Excellence: SLAs, SLOs, and SLIs</h3><p>How do we guarantee that these quality attributes translate to exceptional service?</p><p>Here’s where <strong>Service Level Agreements (SLAs)</strong> come into the picture. These are formal contracts between service providers and their clients that define the level of service expected from the provider. SLAs are critical components in the business world today. They serve to set clear, measurable, and agreed-upon performance standards and lay out the penalties or remedial actions if these standards are not met.</p><p>SLAs specify how much downtime is acceptable, how it is measured, and how outages are handled and reported. Also, it explains remedies and penalties the say about compensation or other remedial actions if the agreed service levels are not achieved. This could include rebates, service credits, or other forms of compensation.</p><p>SLAs are defined based on following:</p><ul><li><strong>Service Level Indicators (SLIs):</strong> SLIs are the performance measurements that provide the data needed to assess whether a service level has been achieved. Metrics such as uptime, response time, latency, error rate, throughput, and availability.</li><li><strong>Service Level Objectives (SLOs):</strong> It defines the desired goal for the service levels and represents an agreement on the expected performance between the service provider and the customer. For example, an SLO might specify that the system should be available 99.95% of the time over a given period.</li></ul><p><strong>SLAs </strong>encompass the SLOs and describe the overall level of service expected, including penalties or remedies if the SLOs (based on SLIs) are not met.</p><p>That is all we wanted to discuss during our first article in the “Designing Large-Scale Systems” series. Let’s wrapup with the following conclusion.</p><h3>Conclusion</h3><p>With today&#39;s world’s complex and critical requirements, designing large-scale systems requires a meticulous approach. Understanding user requirements correctly, prioritizing critical quality attributes, and adhering to strict service levels are the key points of building robust, scalable, and user-centric systems. By following these principles, organizations can build systems that not only meet current user expectations but grow them with their digital journey over the years.</p><p>Hope you enjoyed the article. Let’s discuss more about designing large-scale systems in upcoming articles!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56276d324bd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Eastern Beauty of Sri Lanka-Arugambay, Panama & Kumana National Park]]></title>
            <link>https://erandiganepola.medium.com/eastern-beauty-of-sri-lanka-arugambay-panama-kumana-national-park-b32f629309b9?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b32f629309b9</guid>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[sri-lanka]]></category>
            <category><![CDATA[beach]]></category>
            <category><![CDATA[surfing]]></category>
            <category><![CDATA[wildlife]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Sun, 30 Jun 2024 10:35:11 GMT</pubDate>
            <atom:updated>2024-06-30T10:59:22.298Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxPNCMbMaglkYKKNNHojLA.jpeg" /><figcaption>Leopard “Ritta” | Captured by <a href="https://www.instagram.com/darshatha/">Darshatha Gamage</a> | at <a href="https://www.kumananationalpark.com/">Kumana National Park</a></figcaption></figure><h3>Eastern Beauty During the Season</h3><p>Sri Lanka is popular among travelers for its stunning beaches, welcoming people, diverse wildlife, rich culture and many more, and is a year-round destination thanks to its tropical climate. The only variation comes from the monsoons.</p><ul><li>The southwest of Sri Lanka receives rain during the southwest monsoon season between May to July,</li><li>North and east coastal regions receive wind and rain during the northeast monsoon season from October to December.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*JYUPVSvW-tchK6z-REiDbQ.jpeg" /><figcaption>Source — <a href="https://www.experiencetravelgroup.com/blog/travelling-sri-lanka-september/">https://www.experiencetravelgroup.com/blog/travelling-sri-lanka-september/</a></figcaption></figure><p>A visit to Sri Lanka at any time ensures the opportunity to enjoy its beaches, mainly because one side of the island is always in season. This blog inspired by the Eastern landscape of Sri Lanka which becomes more alive from April to September. During this period, the beaches buzz with tourists, temperatures hover in the mid-30s Celsius, humidity remains low, and the waves are ideal for surfing.</p><h3>The Story Behind the Story</h3><p>Hello there, if you are a frequent reader of my blogs, you might have never or rarely come across with my travel blogs. I mostly pen technical content — 99% of the time. But I also rarely write travel blogs when I feel it’s worth sharing the experience with the world, especially when it is underrated or unspoken.</p><p>Writing about this piece of experience I enjoyed in the East side of Sri Lanka with a group of my closest friends was quite memorable. I will narrate this blog as a 4-day trip starting from Colombo (capital of Sri Lanka) and what you can enjoy during that period and what more.</p><p>Let’s explore!</p><p><strong>Please note</strong> this is not a step-by-step guide on how to travel. I have linked some resources of travelers where you can get more information about traveling in the Eastern side of Sri Lanka.</p><h3>How to travel from Colombo</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*drIYTGHvZjL9PkbBYqnaQQ.png" /></figure><h4>Routes</h4><p>Your journey will likely begin in Colombo, marked here as the starting point. There are two main routes to the eastern side: one through the middle of the hill country, passing scenic spots like Nuwara Eliya and Ella, and another through the south. While the central route offers breathtaking views and visits to the hill country, it takes longer. The southern route, quicker by comparison, allows travel on the Southern Expressway from Colombo to Mattala in Hambantota.</p><h4>Transportation</h4><p>Public transportation would not be the best way to travel to this side of the country. If you must, you can take long-distance buses to reach the East side of the country from the Colombo main bus stations.</p><p>The most preferable way of traveling to this area among locals and tourists is by private vehicle. Apart from hiring or renting vehicles, one of the popular experiences among tourists nowadays is renting a tuk-tuk and traveling the country. You need to have an international driving license for that.</p><p>Tip: Recommend vehicles with higher ground clearance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rrwtFuj50eaiv-BQOh2X1Q.jpeg" /><figcaption>Tuk Tuk drives | Souce — <a href="https://hungariandreamers.com/tuk-tuk-rental-sri-lanka/">https://hungariandreamers.com/tuk-tuk-rental-sri-lanka/</a></figcaption></figure><h3>Panama</h3><p>Our first stay was at a beach camping site in <a href="https://maps.app.goo.gl/oe6pA5CxEJV99Bzv6">Panama</a> which was closer to Kumana National Park. We started our trip with a group of nine friends at around 8 AM from Colombo and had our first stop at <a href="https://maps.app.goo.gl/Skar6aFGp2ktYAHG7">Welipenna service area</a> for breakfast. This service area offers a variety of food, a place where you can savor a mix of local, Indian, and Western cuisine and small grocery shops too.</p><p>Once you are refreshed until you exit from Mattala, it’s around 2-hour ride on the southern expressway and then 3 more hours on the normal road. The route was lined with breathtaking views; distant mountains loomed on the horizon while nearby fields were lush with rice paddies. Local village food stalls along the way offered a taste of authentic Sri Lankan cuisine, perfect for lunch.</p><p>We aimed to reach the Panama beach camping site by sunset, and the timing was perfect as we watched the sun dip below the horizon in a spectacular display.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*6wtVAf8MpyOZ2clLa5UzsQ.gif" /><figcaption>Captured by <a href="https://loneidealist.medium.com/">Imesha Sudasingha</a> | at Panama Beach</figcaption></figure><p>Panama offers plenty of comfortable accommodation locations and you can stay at Kumana or Kumana National Park premises as well. You can find out these easily through <a href="https://booking.com/">Booking.com</a> or via <a href="https://www.kumananationalpark.com/">Kumana National Park</a> official website as well.</p><p>We enjoyed a wild night with the breeze of Panama and enjoyed food and drinks around a roaring bonfire until about 2 AM — a memorable night under the stars.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*SjYvhHqvxtVlkCsaVUoUxA.gif" /><figcaption>Captured by <a href="https://loneidealist.medium.com/">Imesha Sudasingha</a> | at Panama Beach</figcaption></figure><h3>Kumana Safari</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SDVSNx9_S4zLHU17eIpkOw.jpeg" /><figcaption>Captured by <a href="https://www.instagram.com/vishee_sen/">Vishvajinee Senasinghe</a></figcaption></figure><p>The next day, bright and early at 5:30 AM, everyone was surprisingly prompt, eager for the safari. Our pre-booked safari jeeps were right on time. In our group, we had wildlife enthusiasts, compelling us to opt for a full-day safari package, from 6 AM to 6 PM. You can book safari jeeps from the Kumana official website. Moreover, you can pre-book Kumana camping sites and spend the night at Kumana itself.</p><p>Kumana, the eastern sector of Yala National Park and bordered by the ‘Kumbukkan Oya’ river, is a renowned bird sanctuary that hosts a diverse array of species. Besides birds, Kumana is also home to Elephants and Leopards.</p><p>Observing and learning how strategic these mammals are in their natural habitat, particularly the elusive leopards, offers fascinating insights into their survival tactics. Every species has their own strategic way for survival, believe me it’s addictive to learn these!</p><p>For me, it felt like entering a different world — one where I was completely disconnected from all my tech devices and absorbed by the raw beauty of nature. Learning about these species’ survival strategies deepened my appreciation for the wilderness. This is an essential experience for anyone in the tech field needing a break from the digital world.</p><p><strong>PLEASE</strong>! If you visit these gifted landscapes of Sri Lanka, please take full responsibility for preserving their beauty. Do not leave trash behind, harm the wildlife, or damage their habitats. Always strive to leave the place as you found it — or even better.</p><p>Following are few captures from the Safari:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HLCMpuJxjvBI-2VwdCwUIw.jpeg" /><figcaption>Unedited version of the leopard “Ritta” | Captured by <a href="https://www.instagram.com/lewis_simplerider/">Harsha Karunanayake</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*49FPr-dCr8ZZ7FISovaGnQ.jpeg" /><figcaption>Captured by <a href="https://www.instagram.com/darshatha/">Darshatha Gamage</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Re1v96PcNml__0BRYPXP_A.jpeg" /><figcaption>Captured by <a href="https://www.instagram.com/darshatha/">Darshatha Gamage</a></figcaption></figure><h3>Arugambay</h3><p>After a thrilling day on safari, we journeyed to Arugambay that evening. If your schedule allows, I highly recommend staying at least 2–3 nights to fully embrace the nightlife, savor the delicious food, relax in a Spa, and — if you’re up for it — catch some waves, although we unfortunately didn’t have the time for surfing.</p><p>Arugambay offers a different vibe during the season. If you are a traveler who loves beaches like me, it has a lot to offer. Arugambay remembered me the vibe of Phuket, Thailand, or Canggu, Bali. But less crowded and noisy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Jhg8YUvGFPIJtqZbBPqVQ.jpeg" /><figcaption>Arugambay morning waves | Captured by <a href="https://www.instagram.com/_m_ushi_/">Ushan Edirisinghe</a></figcaption></figure><p>Wakeup early to see the beautiful sunrise on the east coast of Sri Lanka and early mornings here are a spectacle of surfers, boards in tow, making their way to the beach. Moreover, explore little cafes on the way to the beach and enjoy a morning coffee or Sri Lankan cup of tea as well.</p><h4>Surfing in Arugambay</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*UBhdCzGnnoeP2RAgJ7lJkA.jpeg" /><figcaption>Captured by <a href="https://www.instagram.com/lewis_simplerider/">Harsha Karunanayake</a></figcaption></figure><p>Arugambay is not the ideal spot for surfing beginners. The waves here are predominantly point breaks, not straightforward, making them better suited for medium to professional surfers.</p><p>If you are a beginner, <a href="https://maps.app.goo.gl/3CHp568UUAucBrPD8">Weligama Sri Lanka</a> is recommended where you can experience straight waves for surfing.</p><p>Nevertheless, Arugambay offers stunning beaches for a relaxing swim and enjoyment of the ocean.</p><h3>A Good End to the Journey</h3><p>Our brief stay in Arugambay ended as we headed back to Colombo, but not without one more thrilling experience. On the way to Colombo, take the route from <a href="https://maps.app.goo.gl/DH3dJThkdpUzQGvc9">Buttala</a> to <a href="https://maps.app.goo.gl/xwFugYXjhKhNmhJFA">Kataragama</a> and you can experience wild elephants as road blockers as evident in the following image. Drivers should be confident enough to take the risk and drive through this route :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HmmRrmVlcaiQirt6u7cMjw.jpeg" /><figcaption>Captured by <a href="https://www.instagram.com/vishee_sen/">Vishvajinee Senasinghe</a></figcaption></figure><p>Do not forget to enjoy seasonal food on the way to Colombo. from April to July, you can relish freshly picked mangoes sold at village stalls. Also on the way back you can visit <a href="https://maps.app.goo.gl/V5uxAfukE8LjvqhcA">Galle fort</a> for the evening sunset or for a snack.</p><p>Our trip concluded with unforgettable experiences and memories, strengthened friendships, and a disconnected time from the modern digital world that was both refreshing and necessary.</p><p>I hold deep affection for this beautiful country and all it has to offer. So warmly welcome travelers and my tech fans all over the world to come and experience my mother nature and please respect and preserve its beauty for its people and the ecosystem.</p><p>Thank you!</p><h3>More information</h3><p>Kumana National Park website — <a href="https://www.kumananationalpark.com/index.php">https://www.kumananationalpark.com/index.php</a></p><p>Kumana National Park travel vlog - <a href="https://www.youtube.com/watch?v=JD6Bv18A2mE&amp;t=48s&amp;ab_channel=Sheneller">https://www.youtube.com/watch?v=JD6Bv18A2mE&amp;t=48s&amp;ab_channel=Sheneller</a></p><p>Arugamabay travel vlog — <a href="https://www.youtube.com/watch?v=JswKqykn2N4&amp;ab_channel=Sheneller">https://www.youtube.com/watch?v=JswKqykn2N4&amp;ab_channel=Sheneller</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b32f629309b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[K8s Bootcamp, The End — CRDs, Helm Fundamentals & Bootcamp Summary]]></title>
            <link>https://erandiganepola.medium.com/k8s-bootcamp-the-end-crds-helm-fundamentals-bootcamp-summary-d82179f13947?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d82179f13947</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[ckad]]></category>
            <category><![CDATA[crd]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Sun, 02 Jun 2024 15:14:39 GMT</pubDate>
            <atom:updated>2024-06-12T13:03:54.489Z</atom:updated>
            <content:encoded><![CDATA[<h3>K8s Bootcamp, The End — CRDs, Helm Fundamentals &amp; Bootcamp Summary</h3><h3>K8s Bootcamp: Forge Your Superpower with Hands-on Exercises from Novice to Advanced Deployments</h3><p>Hello there!</p><p>Welcome to the final article of the K8s Bootcamp series. If you are new here, get a quick start to this article series with my first article on <a href="https://erandiganepola.medium.com/k8s-bootcamp-part-i-k8s-essentials-pods-deployments-and-your-superpower-afa282b153e9">K8s Essentials: Pods, Deployments, and Your Superpower</a>.</p><blockquote>This K8s Bootcamp will discuss novice to advanced K8s concepts and hands-on exercises. Also, this article series will benefit you in achieving your CKAD certification.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YBlPobL_3tk_qElUwER1oA.jpeg" /><figcaption>Creative Commons <a href="https://creativecommons.org/licenses/by-nc-sa/2.0/">License </a>| Creator: James Steidl | Copyright: ©2006 James Steidl James Group Studios inc.</figcaption></figure><p>K8s Bootcamp series has come to an end. I hope you enjoyed the articles and, by following them sequentially, have acquired a comprehensive understanding of the widely used concepts and practical aspects of K8s. This foundational knowledge is crucial for your journey in K8s. As you continue to advance and practice, you’re well on your way to becoming a K8s expert.</p><p>Today we will discuss the last topics. Custom Resource Definitions (CRDs), Helm fundamentals, and the summary of what we discussed so far.</p><p>So let’s get started!</p><h3>Custom Resource Definitions (CRDs)</h3><h4>K8s and etcd</h4><p>Resources such as pods, deployments, namespaces are standard K8s objects. But K8s is designed to be extensible, allowing users to create their own resources without needing to build a custom version of K8s. This is facilitated by storing cluster data in etcd. etcd is a consistent and highly-available key value store used as K8s’ backing store for all cluster data.</p><h4>CRDs Definition and Use</h4><p>Custom Resource Definitions (CRDs) allow you to define new types of resources by specifying its name, group, and version along with other metadata that K8s’ API server can handle. CRDs are a way to extend K8s with new custom resources. It lets us define anything from a minimal configuration up to a complex stateful application.</p><p>Let’s take an example:</p><p>Following CRD defines a new K8s resource type called DatabaseInstance.</p><ul><li>This resource can be used to manage database instances across different environments within a K8s cluster, providing specific configurations such as versions, settings, or replicas.</li><li>This setup allows users to manage databases similarly to how they manage other K8s-native resources, leveraging K8s&#39; built-in tools for monitoring, scaling, and management.</li></ul><pre>apiVersion: apiextensions.k8s.io/v1<br>kind: CustomResourceDefinition<br>metadata:<br>  name: databaseinstances.db.example.com<br>spec:<br>  group: db.example.com<br>  versions:<br>    - name: v1<br>      served: true<br>      storage: true<br>  scope: Namespaced<br>  names:<br>    plural: databaseinstances<br>    singular: databaseinstance<br>    kind: DatabaseInstance<br>    shortNames:<br>    - dbi</pre><p>In this CRD:</p><ul><li><strong>apiVersion</strong>: Indicates the API version of the extension APIs used.</li><li><strong>kind</strong>: Specifies that this is a CustomResourceDefinition.</li><li><strong>metadata.name</strong>: The name of the CRD as used in the API URL.</li><li><strong>spec.group</strong>: The API group that this resource belongs to, which is used in the API URL.</li><li><strong>spec.versions</strong>: Lists the versions of the resource. Each version can be enabled/disabled for API server.</li><li><strong>spec.scope</strong>: Specifies if the resource is namespaced or not.</li><li><strong>spec.names</strong>: Defines how the resource will be known in the API (singular, plural, kind, short names).</li></ul><h4>Custom Resources (CRs)</h4><p>A Custom Resource (CR) is an instance of a Custom Resource Definition. CRs are the actual data that you manage, similar to how Pods are instances of Pod definitions. You can create multiple CR instances once a CRD is in place.</p><p>Given the above CRD for a DatabaseInstance, here’s how a CR might look:</p><pre>apiVersion: db.example.com/v1  # Specifies the API version and group of the Custom Resource (CR).<br>kind: DatabaseInstance         # The kind of the resource, which matches the kind specified in the CRD.<br>metadata:                      # Metadata about this specific resource instance.<br>  name: my-database-instance   # The name of the DatabaseInstance resource.<br>  namespace: production        # Namespace where this instance is deployed.<br>spec:                          # Specifications for the DatabaseInstance resource.<br>  engine: PostgreSQL           # The type of database engine.<br>  version: &quot;12.3&quot;              # The version of the database engine.<br>  storageSize: 10Gi            # The amount of storage allocated to the database.</pre><p>Once we have CRD and CRs, we need to deploy and monitor them. That is where custom controllers come into the picture.</p><h3>Controllers</h3><h4>Overview</h4><p>Controllers are processes that run in the background to watch the state of your resources and make changes where necessary to reach the desired state.</p><h4>Deployment Controller</h4><p>The Deployment controller is a specific type of controller that manages the lifecycle of replicasets and pods to ensure the actual state matches the desired state defined in a Deployment.</p><h4>Custom Controllers</h4><p>Custom controllers are used to monitor custom resources (CRs) continuously, and these are typically written in Go due to their efficient concurrency features which are useful for tasks such as queuing and caching. Next you can dockerize it and run inside K8s cluster.</p><p>That’s an overview about CRDs. Next let’s look into Helm concepts.</p><h3>Helm</h3><h4>The Challenge with K8s Applications</h4><p>K8s doesn’t inherently understand the application context. It sees an application as a collection of individual components such as Pods, Deployments, Services, Persistent Volumes, etc. Managing these components involves handling multiple YAML configuration files, this can become complex, especially as applications scale and update. Therefore the world needs a better solution to manage applications.</p><h4>Helm as a Solution</h4><p>Helm is often referred to as the “package manager for K8s.” It simplifies the management of K8s applications by bundling related K8s resources into a single package called a chart. This approach not only makes deploying and managing applications easier but also supports complex operational requirements like updates, rollbacks, and customization.</p><h4>Installing Helm</h4><p>To begin using Helm, you need to install it on your system. Detailed installation instructions for various operating systems are available on the <a href="https://helm.sh/docs/intro/install/">official Helm website</a>.</p><h4>Helm Charts</h4><p>A <strong>Helm Chart</strong> is a bundle of information necessary to create an instance of a K8s application. The chart itself is a collection of files organized in a specific directory structure:</p><ul><li><strong>Chart.yaml</strong>: Contains metadata about the chart such as version, name, and description.</li><li><strong>Values.yaml</strong>: Specifies configuration values for a chart which can be overridden by user-supplied values.</li><li><strong>Templates/</strong>: This directory contains template files that generate valid K8s manifest files when combined with values.</li></ul><p>Below is a simplified example of a Helm chart for deploying a basic web application. This sample Helm chart includes the necessary directory structure and files for deploying a web application that runs on an Nginx server.</p><h4>Directory Structure of the Helm Chart</h4><p>Here’s a basic outline of the directory structure for our webapp Helm chart:</p><pre>webapp/<br>├── Chart.yaml<br>├── values.yaml<br>├── templates/<br>│   ├── deployment.yaml<br>│   ├── service.yaml<br>│   └── ingress.yaml<br>└── README.md</pre><p><strong>Chart.yaml</strong> — This file contains metadata about the chart.</p><pre>apiVersion: v2                       # The apiVersion for the Helm chart specification (always v2 for Helm 3).<br>name: webapp                         # The name of the Helm chart.<br>description: A Helm chart for K8s to deploy an Nginx web application  # A brief description.<br>type: application                    # The type of the chart. &#39;application&#39; or &#39;library&#39; are common values.<br>version: 0.1.0                       # The version of the chart itself, following semantic versioning.<br>appVersion: &quot;1.16.0&quot;                 # The version of the application to be deployed. This should match the application&#39;s version that the chart deploys.</pre><p><strong>values.yaml - </strong>This file contains default values for the chart.</p><pre>replicaCount: 1  # Specifies the number of replicas of the application to run.<br><br>image:           # Defines the docker image details for the application.<br>  repository: nginx          # The repository from which the image is pulled.<br>  pullPolicy: IfNotPresent   # The image pull policy: &quot;IfNotPresent&quot; means the image is pulled only if it&#39;s not already present locally.<br>  tag: &quot;1.16.0&quot;              # The tag specifying the exact version of the image to use.<br><br>service:         # Configuration for the service that exposes the application.<br>  type: ClusterIP            # The type of service: ClusterIP exposes the service on a cluster-internal IP.<br>  port: 80                   # The port on which the service is exposed internally in the cluster.<br><br>ingress:         # Configuration for the ingress resource that exposes the service externally.<br>  enabled: false             # Specifies if ingress is enabled (true) or not (false).<br>  annotations: {}            # Custom annotations for the ingress resource.<br>  hosts:                     # A list of hosts and paths that the ingress resource will route from.<br>    - host: chart-example.local  # The hostname to route from.<br>      paths:<br>        - path: /                # The path under the specified host.<br>          pathType: ImplementationSpecific  # Specifies how the path is matched. &quot;ImplementationSpecific&quot; allows the Ingress controller to choose the path matching strategy.</pre><p><strong>templates/deployment.yaml-</strong>This template defines a K8s deployment for the web application.</p><pre>apiVersion: apps/v1                             # The API version for the deployment specification.<br>kind: Deployment                                # Specifies that this is a Deployment resource.<br>metadata:<br>  name: {{ include &quot;webapp.fullname&quot; . }}       # Sets the name of the Deployment using a templated value.<br>  labels:                                       # Applies labels to the Deployment, defined in your chart&#39;s helpers.<br>    {{- include &quot;webapp.labels&quot; . | nindent 4 }}<br>spec:<br>  replicas: {{ .Values.replicaCount }}          # The number of replicas (pods) to maintain.<br>  selector:                                     # Selector that determines which pods belong to the deployment.<br>    matchLabels:<br>      {{- include &quot;webapp.selectorLabels&quot; . | nindent 6 }}<br>  template:                                     # Template for the pods the deployment manages.<br>    metadata:<br>      labels:                                   # Labels applied to all pods in the deployment.<br>        {{- include &quot;webapp.selectorLabels&quot; . | nindent 8 }}<br>    spec:                                       # Specification of the pod.<br>      containers:<br>        - name: nginx                           # Name of the container within the pod.<br>          image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;  # The image (and its tag) to use for the container.<br>          ports:<br>            - containerPort: 80                 # The port the container exposes.<br>          livenessProbe:                        # Liveness probe to check the health of the container.<br>            httpGet:<br>              path: /                           # Path to access on the container to check its health.<br>              port: http                        # Port to use for the liveness probe.<br>          readinessProbe:                       # Readiness probe to determine if the container is ready to serve traffic.<br>            httpGet:<br>              path: /                           # Path to access on the container to check readiness.<br>              port: http                        # Port to use for the readiness probe.</pre><p>In the same way we have done above for<strong> templates/deployment.yaml, the same approach needs to be done for templates/service.yaml (</strong>for K8s service for the web application) and for <strong>templates/ingress.yaml (</strong>K8s ingress).</p><p>You can create helm charts as above as well as re-use existing ones. Those can be managed in chart repositories.</p><h4>Chart Repositories</h4><p>Helm charts can be stored and shared through chart repositories. <a href="https://artifacthub.io/">Artifact Hub</a> is a major community-driven repository where you can find thousands of Helm charts for different applications, maintained by the community or by vendors. Vendors like <a href="https://bitnami.com/">Bitnami</a> provide professionally managed and regularly updated Helm charts for a wide range of applications.</p><h3>Fundamental Helm Commands</h3><p>Helm’s operation revolves around a few basic commands:</p><ul><li>helm install: Installs a chart to create a new release in your cluster.</li><li>helm upgrade: Upgrades a release to a new version of a chart.</li><li>helm rollback: Rolls back a release to a previous version.</li><li>helm delete: Deletes a release.</li><li>helm search: Searches for charts in a repository.</li></ul><p>These commands cover the lifecycle management of K8s applications, simplifying tasks that would otherwise require managing multiple YAML files and complex upgrade paths.</p><h4>Deploying an Application with Helm</h4><p>To deploy an application using Helm, you can pull a chart from a repository like Artifact Hub or bitnami, modify the values.yaml to meet your requirements, and then use helm install to deploy it to your cluster. Here&#39;s a simple example using a hypothetical WordPress chart:</p><pre>helm repo add bitnami https://charts.bitnami.com/bitnami<br>helm install my-wordpress bitnami/wordpress --version 9.0.3</pre><p>This command adds the Bitnami repository, then installs the WordPress application using the Bitnami WordPress chart, with all dependencies and configurations handled automatically.</p><p>With that, we covered an overview understanding of Helm as well.</p><p>Now let’s wrapup our series of knowledge!</p><h3>Summary of the Bootcamp series</h3><p>In this article series, we covered the most important and widely used K8s concepts with hands-on exercises from 10 articles and this is the last or the 11th article.</p><p>We covered the following:</p><ul><li>Essentials such as pods, deployments, namespaces and YAML which are required to deploy and manage a K8s cluster [<a href="https://medium.com/@erandiganepola/k8s-bootcamp-part-i-k8s-essentials-pods-deployments-and-your-superpower-afa282b153e9">Day 1</a>][<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-2-more-about-pods-deployments-namespaces-and-yaml-2d787f0dbee6">Day 2</a>][<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-3-more-about-namespaces-and-security-1851e5891a3a">Day 3</a>].</li><li>Environment variables for keeping your configurations and sensitive data via different ways such as ConfigMaps and Secrets [<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-4-environment-variables-configmaps-and-secrets-f28ff51980f6">Day 4</a>].</li><li>Observability aspects that are crucial in K8s for ensuring reliability (to reduce downtimes and maintain system health), performance optimization, and security of applications running within containerized environments [<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-5-observability-probes-monitoring-logging-and-tracing-essentials-c1036479ea2c">Day 5</a>].</li><li>Deploying and scaling your K8s clusters strategically using strategies like rolling updates, rollbacks and strategies like blue-green and canary [<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-6-deployment-strategies-rolling-updates-blue-green-and-canary-ecf06e1fe5d5">Day 6</a>].</li><li>Services and ingress for exposing your applications running within the cluster to external traffic and managing them in a K8s environment [<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-7-services-ingress-networking-part-i-eb4a88bf35a6">Day 7</a>][<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-8-services-ingress-networking-part-ii-09bdce32e213">Day 8</a>].</li><li>Learn Persistent Volumes, Storage Classes, and Stateful Sets. Given the transient nature of pods, which can be destroyed and recreated along with their memory, ensuring data persistence is crucial [<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-9-state-persistence-persistence-volumes-claims-storage-classes-stateful-sets-9fb06458ed6f">Day 9</a>].</li><li>Security primitives which are essential for accessing your K8s objects securely [<a href="https://medium.com/@erandiganepola/k8s-bootcamp-day-10-security-primitives-overview-authentication-authorization-863176ad6963">Day 10</a>].</li><li>Define define new types of resources via CRDs and K8s widely used package manager, Helm [<a href="https://erandiganepola.medium.com/k8s-bootcamp-the-end-crds-helm-fundamentals-bootcamp-summary-d82179f13947">Last</a>].</li></ul><p>Hope you gained good knowledge from this article series. This will be a helpful guide if you are facing the <a href="https://training.linuxfoundation.org/certification/certified-kubernetes-application-developer-ckad/">CKAD certification</a> exam as well.</p><p>Good luck with your K8s journey and let’s connect with more technical articles in the future as well!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d82179f13947" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[K8s Bootcamp Day 10 — Security Primitives Overview: Authentication & Authorization]]></title>
            <link>https://medium.com/swlh/k8s-bootcamp-day-10-security-primitives-overview-authentication-authorization-863176ad6963?source=rss-a85df5f6123e------2</link>
            <guid isPermaLink="false">https://medium.com/p/863176ad6963</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[rbac]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[Erandi Ganepola]]></dc:creator>
            <pubDate>Sun, 19 May 2024 12:19:52 GMT</pubDate>
            <atom:updated>2024-05-19T12:19:52.734Z</atom:updated>
            <content:encoded><![CDATA[<h3>K8s Bootcamp Day 10 — Security Primitives Overview: Authentication &amp; Authorization</h3><h3>K8s Bootcamp: Forge Your Superpower with Hands-on Exercises from Novice to Advanced Deployments</h3><p>Hello there!</p><p>Welcome to the 10th article of the K8s Bootcamp series. If you are new here, get a quick start to this article series with my first article on <a href="https://erandiganepola.medium.com/k8s-bootcamp-part-i-k8s-essentials-pods-deployments-and-your-superpower-afa282b153e9">K8s Essentials: Pods, Deployments, and Your Superpower</a>.</p><blockquote>This K8s Bootcamp will discuss novice to advanced K8s concepts and hands-on exercises. Also, this article series will benefit you in achieving your CKAD certification.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ihFLEkNNAyVvU_XghlCz4g.jpeg" /><figcaption>Creative Commons <a href="https://creativecommons.org/publicdomain/zero/1.0/">License details</a> | Creator: rawpixel.com | Credit: rawpixel.com</figcaption></figure><p>In this article, we will discuss security primitives which are essential for accessing your K8s objects securely. We will explore more about authentication mechanisms and authorization mechanisms such as Role Based Access Control (RBAC) and Attribute Based Access Control (ABAC).</p><p>So let’s get started!</p><h3>Security Primitives Overview</h3><p>Let’s have an overview of security primitives in this section and dive deeper into authentication and authorization mechanisms in the next sections.</p><p>Security primitives ensure that only authenticated and authorized users and services can access cluster resources and perform desired operations.</p><h4><strong>Authentication</strong></h4><p>“Who can access the server?” - Authentication in the K8s context determines the identity of users or services trying to access the K8s API server. Various mechanisms can be used for authentication such as:</p><ul><li><strong>Username &amp; Password</strong>: A simple and common method for human users. Not recommended for production environments since it’s less secure.</li><li><strong>Tokens</strong>: Often used for automated access by services or scripts.</li><li><strong>Certificates</strong>: Provides robust security by using client certificates for authentication.</li><li><strong>External Identity Providers (IDPs)</strong>: Integration with external authentication services like LDAP, SAML, or OAuth providers.</li><li><strong>Service Accounts</strong>: Used for processes that run in pods, allowing K8s to control and limit access.</li></ul><h4><strong>Authorization</strong></h4><p>“What can they do?” - Once authenticated, authorization rules define what actions the authenticated entities are allowed to perform. Common K8s authorization methods include:</p><ul><li><strong>Role-Based Access Control (RBAC)</strong>: Allows fine-grained permission control based on roles assigned to users or groups.</li><li><strong>Attribute-Based Access Control (ABAC)</strong>: Permissions are granted based on attributes or policies.</li><li><strong>Node Authorization</strong>: A special-purpose authorization mode that specifically governs node access.</li><li><strong>Webhook Mode</strong>: External services can be used to make authorization decisions.</li></ul><h4>TLS Certificates</h4><p>Apart from entities such as users or services, other K8s components want to communicate with the Kube APIServer. Communication between K8s components, such as between the API server and Kubelets, is secured using TLS certificates. This ensures that data remains confidential and is only accessible to properly authenticated and authorized entities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WVzkYwJRyGVoxky0lWTUVg.jpeg" /></figure><h4>Communication between applications within the cluster</h4><p>By default, all pods within a K8s cluster can communicate with each other. To restrict and control this inter-pod communication, network policies can be applied.</p><p>We discussed overall aspects of security primitives in a K8s environment, and communication from outside the cluster and within the cluster. Next, let’s go into detail about authentication and authorization mechanisms that are important when accessing the cluster from outside.</p><h3>Authentication Mechanisms</h3><p>K8s supports a variety of authentication mechanisms to verify the identity of users and systems that interact with the cluster. These users can broadly be categorized into two groups:</p><ol><li><strong>Humans</strong>: This includes administrators, developers, and other users who manage and operate the cluster.</li><li><strong>Robots</strong>: Typically service accounts that are used by applications, services, or automated processes that require access to the cluster.</li></ol><h4>Integration with External Systems</h4><p>K8s itself does not manage user accounts directly. For human users, integration with third-party Identity Providers (IDPs) such as LDAP servers, SAML providers, or OAuth services is necessary. This approach allows K8s to delegate authentication to systems that specialize in user management.</p><p>On the other hand, K8s has built-in support to manage service accounts, which are used primarily by applications running within the cluster.</p><h4>Authentication Options</h4><p>As we have discussed before, the API server in K8s handles all user access within the cluster, supporting several authentication methods such as basic authentication, certificate-based authentication and third-party IDPs.</p><p><strong>Static Password and Token Files</strong>: Although K8s supports static password and token files for authentication, this method is not recommended due to security risks. If used:</p><ul><li>Passwords: A static file contains usernames and passwords. The API server is configured to read this file.</li><li>Tokens: Similar to password files, a token file contains tokens that can be used for authentication. The filename containing tokens is passed to the kube-api server.</li></ul><h4>KubeConfig file</h4><p>The KubeConfig file is important and central to configuring access to multiple clusters. It consists of three main parts:</p><ul><li><strong>Clusters</strong>: Defines the various K8s clusters accessible to the user.</li><li><strong>Users</strong>: Specifies user accounts and their authentication credentials.</li><li><strong>Contexts</strong>: Combines a cluster and a user, specifying which user account is used to access which cluster.</li></ul><p>Below is an example of a <em>kubeconfig.yml</em> file that outlines the basic structure:</p><pre>apiVersion: v1                        <br>kind: Config                          <br>clusters:                             <br>- name: prod-cluster                  # Name of the cluster configuration<br>  cluster:<br>    server: https://192.168.0.100     # URL to the Kubernetes API server<br>    certificate-authority: /etc/kubernetes/ssl/ca.crt  # Path to the CA certificate for this cluster<br><br>users:                                <br>- name: john-doe                      # Name of the user configuration<br>  user:<br>    client-certificate: /home/jane/.kube/cert.crt  # Path to the user&#39;s certificate<br>    client-key: /home/jane/.kube/key.key           # Path to the user&#39;s key<br><br>contexts:                             <br>- name: prod-john                     # Name of the context<br>  context:<br>    cluster: prod-cluster             # References the cluster named prod-cluster<br>    user: john-doe                    # References the user named jane-doe<br>    namespace: production             # The default namespace to use with this context<br><br>current-context: prod-john            # The current active context</pre><p><em>kubectl config view</em>command will list the config.</p><p>This configuration specifies how a user named “john-doe” connects to a cluster named “prod-cluster” using specific certificates for authentication. The current-context defines which context is active by default when interacting with the cluster.</p><h4>API Groups</h4><p>API groups are designed to organize K8s resources under different categories, making it easier to extend the K8s API. These groups are divided based on their functionality and the type of objects they deal with.</p><p><strong>Main API Groups:</strong></p><ul><li>/api (Core Group): This is the default group, often referred to as the &quot;core&quot; group. It contains the fundamental resources necessary for Kubernetes operations, such as Pods, Services, and Nodes.</li><li>/apis (Named Groups): This endpoint hosts the newer, more specialized groups. Examples include apps for deployment-related resources, rbac.authorization.k8s.io for RBAC resources, and extensions for extended functionality.</li></ul><p><strong>Additional common API endpoints include:</strong></p><ul><li>/version: Provides the current version of the K8s API server.</li><li>/metrics: Offers various metrics for the K8s API server, useful for monitoring and performance analysis.</li><li>/health: Reports on the health of the API server, useful for health checks and monitoring.</li></ul><h4>Accessing the K8s API</h4><p>K8s API can be accessed either through the kubectl command-line utility or directly via RESTful calls.</p><ul><li><strong>Using Certificates</strong>: Clients like curl can authenticate directly using client certificates. This method is secure and commonly used in scripts and external applications and can be used when accessing via RESTful calls.</li><li><strong>Via a </strong><strong>kubectl proxy</strong>: The kubectl proxy command sets up a proxy server on the local machine that handles authentication to the K8s API using certificates stored in the kubeconfig file. This is a convenient method for development and testing.</li></ul><p><strong>Clarification on Proxy Terms</strong>: It’s important to note that kubectl proxy and kube-proxy are distinct:</p><ul><li>kubectl proxy: A command that creates a local web proxy that provides API access without requiring additional headers or direct exposure of the API credentials.</li><li>kube-proxy: A network proxy that runs on each node in the cluster, maintaining network rules that allow network communication to pods from network sessions inside or outside of the cluster.</li></ul><p>This structured approach to API groups helps in managing and extending K8s efficiently, ensuring that each type of resource is logically grouped and easily accessible.</p><p>That is about authentication, let’s look into authorization next.</p><h3>Authorization</h3><p>Authorization in K8s determines what authenticated users are allowed to do within the cluster. It is crucial when the cluster’s resources are accessed by multiple parties such as cluster admins, developers, and automated services. To ensure security and operational efficiency, users should have restricted access, allowing them to perform only the tasks they are intended to do.</p><h4>Using Namespaces for Logical Separation</h4><p>When sharing the cluster among multiple teams or organizations, namespaces are used to logically separate resources. This setup helps in restricting users and groups to access only the resources within their designated namespaces.</p><h4><strong>Authorization Mechanisms</strong></h4><ul><li><strong>Node Authorization:</strong> The Node Authorizer is a specific component that regulates the actions <em>kubelets</em> can perform. When <em>kubelets</em> access the API server to manage resources or report on the status of nodes, pods, or services, the Node Authorizer evaluates these requests to ensure they are allowed.</li><li><strong>Attribute-Based Access Control (ABAC)</strong>: ABAC allows fine-grained access control based on attributes (properties) of the user or the resource. Policies are defined in a JSON format, which are then passed to the API server. This method provides flexibility but can become cumbersome as each change requires updating the policy file and restarting the API server.</li><li><strong>Role-Based Access Control (RBAC)</strong>: RBAC is one of the most commonly used authorization mechanisms in K8s. It allows permissions to be defined based on roles assigned to users or groups, and these roles can be scoped to namespaces or applied cluster-wide. Let’s discuss more about this later.</li><li><strong>Webhook Mode</strong>: Webhook is an external method for managing authorization. When using a webhook, K8s sends the authorization checks to an external service. This service evaluates the request and returns a response to the API server. An example of such a service is the Open Policy Agent (OPA), which can handle both authorization and admission control.</li><li><strong>AlwaysAllow and AlwaysDeny Authorization Modes</strong>:<br>- <strong>AlwaysAllow</strong>: This mode allows all requests without any checks. It is useful for development but not recommended for production environments.<br>- <strong>AlwaysDeny</strong>: Conversely, this mode denies all requests, useful for testing the behavior of denied accesses.</li></ul><h4>Operation of Multiple Authorization Modes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*wQWf6eRmDa4jH3G9zzD3iw.png" /></figure><p>K8s can be configured with multiple authorization modes. If multiple modes are specified, the API server checks each request in the specified order. If a mode denies a request, it is passed to the next mode in the sequence. The request is approved if any mode grants permission.</p><h3>More about Role-Based Access Control</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NCceN16pMhqmoiXcEPgng.jpeg" /></figure><p>As we discussed before in this article, RBAC in K8s allows the configuration of who can access certain resources and what they can do with those resources. Let’s discuss more about how to do it in this section.</p><p>As shown in the above figure, there are two roles named “Developer” and “Security” and granted a set of permissions that those roles can do. Next we have mapped “Dev user 1” and “Dev user 2” to “Developer” role and “Security user” to “Security” role. This is the same thing we need to do with K8s configuration files. Let’s see how to do it.</p><h4>Creating and Managing Roles</h4><ul><li><strong>Roles</strong>: These are used to grant permissions within a namespace. We can define a role via a YAML file (often referred to as “<em>role-definition.yml</em>”). This file specifies the permissions the role contains.</li><li><strong>Role Bindings</strong>: After creating a role, you bind it to users, groups, or service accounts using a role binding (<em>role-binding.yml</em>). This links the defined permissions of the role to the entity it is bound to.</li><li><strong>Namespace-specific</strong>: Both roles and role bindings are namespace-specific. If you want to restrict access to a particular namespace, you specify that namespace in the metadata section of the role or role binding definition.</li></ul><p>Following is an example of a <em>role-definition.yml</em> file that defines a role:</p><pre>apiVersion: rbac.authorization.k8s.io/v1 <br>kind: Role                                 <br>metadata:<br>  namespace: dev-namespace                 # Namespace where this role is applied<br>  name: developer                          # Name of the role<br>rules:                                     # Rules section defines permissions<br>- apiGroups: [&quot;&quot;]                          # Core API group<br>  resources: [&quot;pods&quot;]                      # Resources this role can access<br>  verbs: [&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;]          # Actions that can be performed</pre><p>Following is an example of a <em>role-binding-definition.yml</em> file that defines the role binding:</p><pre>apiVersion: rbac.authorization.k8s.io/v1  <br>kind: RoleBinding                        <br>metadata:<br>  name: dev-role-binding                   # Name of the role binding<br>  namespace: dev-namespace                 # Namespace where the role binding is applied<br>subjects:                                  # List of users, groups, or service accounts<br>- kind: User                               # Type of subject (User, Group, or Service Account)<br>  name: dev-user-1                         # Name of the user<br>  apiGroup: rbac.authorization.k8s.io      # API group for RBAC<br>roleRef:                                   # Reference to the role being bound<br>  kind: Role                               # The kind is Role (could also be ClusterRole)<br>  name: developer                          # Name of the role to bind<br>  apiGroup: rbac.authorization.k8s.io      # API group for RBAC</pre><h4>Commands</h4><p>The following command can be used to create role/role-binding:</p><pre>kubectl create -f &lt;file-name.yml&gt;</pre><p>Also,</p><ul><li>You can use kubectl describe role &lt;role-name&gt; to view the details of a specific role.</li><li>To check the details of a role binding, use kubectl describe rolebinding &lt;name&gt;.</li><li>To verify if a user has permissions to perform a specific action, you can use: kubectl auth can-i &lt;action&gt; &lt;resource&gt;.</li></ul><h3>Cluster Roles and Cluster Role Bindings</h3><h4>Cluster-wide Resources</h4><p>While roles and role bindings are namespace-specific, some resources like nodes and persistent volumes are cluster-wide and cannot be confined to a namespace. Therefore to restrict access to cluster-wide resources, cluster roles and cluster role bindings are used.</p><h4>Cluster Roles</h4><ul><li>Cluster roles are similar to roles but are intended for granting permissions on cluster-wide resources or across all namespaces.</li><li>You define cluster roles in a similar way to roles but without specifying a namespace.</li></ul><h4>Cluster Role Bindings</h4><ul><li>Same as previously discussed role bindings, but these are used to apply cluster roles to users, groups, or service accounts, granting them permissions across the entire cluster.</li></ul><p>Following is an example YAML for defining a cluster role (<em>cluster-role-definition.yml</em>):</p><pre>apiVersion: rbac.authorization.k8s.io/v1  <br>kind: ClusterRole                         <br>metadata:<br>  name: admin-cluster-resources           # Name of the cluster role<br>rules:                                   <br>- apiGroups: [&quot;&quot;]                         <br>  resources: [&quot;nodes&quot;]                    # Resources this role can access<br>  verbs: [&quot;get&quot;, &quot;list&quot;, &quot;watch&quot;]         # Actions that can be performed on nodes<br>- apiGroups: [&quot;storage.k8s.io&quot;]           # API group for storage resources<br>  resources: [&quot;storageclasses&quot;]           # Access to storage classes<br>  verbs: [&quot;create&quot;, &quot;delete&quot;, &quot;get&quot;, &quot;list&quot;, &quot;watch&quot;]  # Actions allowed on storage classes</pre><p>Following is a sample Cluster Role Binding Definition YAML (<em>cluster-role-binding-definition.yml</em>):</p><pre>apiVersion: rbac.authorization.k8s.io/v1     <br>kind: ClusterRoleBinding                     <br>metadata:<br>  name: admin-cluster-resources-binding      # Name of the cluster role binding<br>subjects:                                    # List of users, groups, or service accounts<br>- kind: User                                 # Type of subject (User, Group, or Service Account)<br>  name: john-doe                             # Name of the user<br>  apiGroup: rbac.authorization.k8s.io        # API group for RBAC<br>roleRef:                                     # Reference to the cluster role being bound<br>  kind: ClusterRole                          # The kind is ClusterRole<br>  name: admin-cluster-resources              # Name of the cluster role to bind<br>  apiGroup: rbac.authorization.k8s.io        # API group for RBAC</pre><p>This YAML file binds the admin-cluster-resources cluster role to the user john-doe. This binding allows john-doe to perform the specified actions on nodes and storage classes across the entire cluster.</p><p>These configurations are essential for setting up broad access controls at the cluster level, allowing administrators to manage critical cluster-wide resources effectively.</p><h4>Commands</h4><p>To create cluster role/role-binding, use:</p><pre>kubectl create -f &lt;file-name.yml&gt;</pre><ul><li>To view cluster roles, use kubectl get clusterroles.</li><li>To list all the cluster role bindings, use kubectl get clusterrolebindings.</li></ul><p>With that, we have covered the security primitives overview, authentication, and authorization mechanisms in K8s. Also explained further about RBAC which is crucial for authorization.</p><p>That’s it for today. Let’s meet with our next BootCamp session soon!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=863176ad6963" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/k8s-bootcamp-day-10-security-primitives-overview-authentication-authorization-863176ad6963">K8s Bootcamp Day 10 — Security Primitives Overview: Authentication &amp; Authorization</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>