In this paper, we investigate the trade-off problem between the high robustness against cascading failures and the low costs of network constructions in complex networks. Since the important nodes with highly connected components usually play a key role in the network structure and network dynamics, we propose an optimal capacity allocation model based on node importance. The novel model will increase the capacities of those important nodes but reduce the network construction cost with the appropriate capacity allocation parameter. Moreover, we also discover that our matching model can enhance the robustness against cascading failures on the IEEE 300 network.