Significance In real-world scenarios, many subnetworks interact with other subnetworks to form a modular interacting network system. In previous models, it was assumed that all subnetworks may be linked pairwise; however, in real systems, only some pairs of subnetworks are connected. Understanding how to develop theoretical frameworks and study system resilience of general coupling patterns of the subnetworks is of significant importance for designing and optimizing economic, social, and infrastructure networks. Here we present two frameworks for such systems having specific coupling patterns to investigate their resilience. Specifically, we find an optimal level of interaction between subnetworks, which maximizes the system’s resilience to failures. Our findings highlight the need to consider real-world coupling patterns and possible optimizations for designing resilient systems.