Welcome to the megalith: When applications outgrow monolith scale

Amir Rapson

October 14, 2025

How architecture-aware AI modernizes the megalith

Monolithic architectures are good. I’m the first person to say it. They’re a strong way to start and can withstand high levels of complexity. They perform where microservices of similar intricacy would have long since toppled.

But complexity can cripple innovation and engineering velocity. At vFunction, we believe good architecture is the foundation of good software.  We spend time defining good architecture and how to best transform tangled monoliths into microservices or modular monoliths—after first refactoring complexity and reducing internal dependencies in the applications.

What we haven’t discussed in our previous writings and talks are the truly massive monolithic applications we encounter. Think 10-50 million lines of code. Twenty thousand to 100,000 classes. Dependencies so vast you can’t even draw them on a screen.

Welcome to the megalith.

Don’t call it legacy

We often label these very large applications “legacy.” However, they often are the core of the business, representing hundreds of person-years of development. With a serious backlog of innovation and many developers dedicated to them, they contribute significantly to the company’s bottom line.

Popup Image

These megaliths grow out of urgent business needs.  Teams work on them under pressure, with little time to spare—prioritizing speed over structure. Engineers accept technical debt due to business urgency. Complexity accumulates to a breaking point. 

Megaliths still operate in production, but change is costly. Any update has an impact beyond the code it touches. With no clear boundaries around modules, it’s safer to avoid any risk. Therefore, even though these applications are mission-critical, updates are rare because of the risks involved. So next time you encounter a megalith, please respect it. And don’t call it legacy.

When code assistants can’t handle critical applications

Tools like GitHub Copilot and Amazon Q are impressive. They accelerate code generation and assist with routine programming tasks. They excel at pattern recognition and suggesting completions, leveraging vast datasets of existing code. But they operate at the level of individual code snippets and localized context. The sheer scale and intricate interdependencies of a megalithic application fundamentally challenge these tools.

Code assistants, in their current form, weren’t designed to navigate megalithic levels of systemic complexity.

Popup Image

At megalith scale, you need architecture-aware modernization

Bridging this gap requires a different approach – integrating deep architectural intelligence with AI to analyze, understand, and guide modernization at megalith scale.

This is where dynamic analysis becomes indispensable. While static analysis attempts to map all possible code paths and dependencies from the source code, dynamic analysis observes the application as it runs. It captures real-world execution flows, actual dependency calls, and the true footprint of an application’s behavior. This approach is ideal for megalithic systems.  It doesn’t need to comprehend the theoretical entirety of the codebase. Instead, it focuses on how the application operates.

Popup Image

For a megalith with millions of lines of code and thousands of classes, attempting to create a complete static map is an exercise in futility. vFunction runs the application through various use cases observing what’s used and how, so it can: 

  • Identify active dependencies
  • Delineate architectural boundaries based on runtime interactions, 
  • Filter out unused or irrelevant code paths—the “noise” that overwhelms static tools. 

This real-time, behavioral understanding is the only practical way to approach and successfully modernize megaliths.

What’s new in vFunction 4.4

Recognizing these profound challenges, vFunction’s new 4.4 release introduces a suite of capabilities to tackle megaliths. 

  • Faster performance for deeper analysis of incredibly large codebases
  • Greater transparency, exposing confidence levels in insights, such as dead-code identification and the anticipated impact of refactoring on overall architecture
  • Smarter noise filtering removes access to temporary files, unneeded resources, and other distractions, so focus stays on the core architecture
Popup Image

We also bolstered automatic refactoring through the use of prompts and GenAI by adding more to-do’s to expose new APIs, replace entry points, and refactor out recursions, among other improvements.

Popup Image

By providing granular, context-aware prompts, vFunction guides the GenAI engine to perform precise refactoring operations, ensuring the integrity and functionality of the modernized application. This uses dynamic analysis to focus the code assistant’s static analysis capabilities on the right thing, significantly reducing the time and effort required for large-scale refactoring. With these updates,  the modernization of megalithic applications is not only possible but also efficient and predictable.

Popup Image
vFunction Introduces GenAI-Powered Architectural Intelligence for Code Assistants
Read Q3 Announcement

When your architecture is in the way of your AI transformation

Modernization is no longer just about optimizing existing systems.  It’s about building the foundation for AI transformation. Enterprises are investing heavily in AI initiatives, but the success of these endeavors hinges on critical applications being flexible, well-architected, and understood.

Popup Image

Without a clear architectural blueprint, attempts to inject AI into business processes or leverage generative AI for development falter. AI models thrive on clean, well-defined data and clear operational boundaries—precisely the outcomes modernization aims to establish.

Modernizing megalithic applications isn’t a separate initiative or side project. It’s a prerequisite for unlocking the full potential of AI transformation within the enterprise.

See how vFunction makes megalith-scale modernization possible
Explore Platform
Amir Rapson

CTO & CCSO/Co-Founder

Amir Rapson co-founded vFunction and serves as its CTO, where he leads its technology, product and engineering. Prior to founding vFunction in 2017, Amir was a GM and the VP R&D of WatchDox until its acquisition by Blackberry, where Amir served as a VP of R&D. Prior to WatchDox, Amir held R&D positions at CTERA Networks and at SofaWare (Acquired by Check Point). Amir has an MBA from the IDC Herzlia, and a BSc in Physics from Tel-Aviv University.

Get started with vFunction

Accelerate engineering velocity, boost application scalability, and fuel innovation with architectural modernization. See how.