Singleflight in Go: Optimize Concurrent Requests

Optimizing Concurrent Data Fetching in Go with singleflight When multiple requests for the same resource arrive simultaneously, you have a choice: make redundant calls or coalesce them. I’ve hit this pattern enough times that Go’s singleflight package has become a default tool in my kit. Let’s dive into how singleflight can optimize concurrent data fetching, using the example of fetching currency exchange rates in a financial application. All code examples from this essay can be found at this repository . ...

November 13, 2024 · 10 min · Aleksandar Nesovic

Container-Optimized OS on GCP

This essay covers what makes COS worth considering: root filesystem immutability, automatic updates, and how to use it with regional managed instances for scaling. I’ll also cover startup scripts and practical considerations for engineering teams. A Brief Overview of Container-Optimized OS Container-Optimized OS is a lightweight, secure operating system image designed by Google specifically for running containers on GCP. Based on the open-source Chromium OS project, COS is tailored to offer a minimal footprint, reducing potential attack surfaces and simplifying maintenance. It comes pre-installed with essential tools like Docker and containerd, enabling teams to deploy containers out of the box without additional setup. ...

November 5, 2024 · 12 min · Aleksandar Nesovic

Overcoming Scalability Challenges in a Modular-Monolith

Building a Health-Data Platform I have had the opportunity to work on several complex and challenging projects. One such project was a health-data platform designed as a modular monolith with a plethora of complex requirements to fulfill. As a health-data platform, ensuring the security and compliance of our users’ sensitive information was paramount. To that end, we made it a priority to align with both HIPAA and SOC-2 standards. Compliance and Security Measures for a Health-Data Platform SOC-2 Compliance For SOC-2 compliance, we implemented various strict controls to guarantee the safety of our user’s data. This included implementing multi-factor authentication, such as FIDO tokens, for added security. We also conducted regular security assessments and backups to ensure that any data would be protected in the event of a security breach. Additionally, we employed SOC-2-compliant cloud providers to host and store sensitive data. A Governance, Risk management, and Compliance (GRC) program was established and reviewed regularly to maintain SOC-2 compliance. ...

January 26, 2023 · 6 min · Aleksandar Nesovic

The Unmanageable Monster

The Challenge of Managing Complexity Software complexity grows faster than our ability to manage it. Businesses get more complex, so the software supporting them follows. Languages and tooling improve, but the underlying problem remains: every system eventually becomes harder to change than to replace. The Complexity Cycle Engineers try to manage complexity through diagrams, architecture documents, and visual representations. It helps for a while. Then the system outgrows the diagrams. A new team is brought in to redesign from scratch, and the cycle repeats. ...

January 21, 2023 · 3 min · Aleksandar Nesovic