The drastic growth of mobile traffic greatly challenges the capacity of mobile infrastructures. Dense deployment of low-power small cells helps alleviate the congestion in the radio access network, yet it also introduces large complexity for network management. Software-defined radio access network has been proposed to tackle the added complexity. However, existing software-defined solutions rely on a fully centralized control plane to make decisions for the whole network, which greatly limits the scalability and responsiveness of the control plane. In this paper, we propose a hierarchical software-defined radio access network architecture. The proposed architecture leverages the hierarchical structure of radio access networks, deploying additional local controllers near the network edge. Utilizing the intrinsic locality in radio access networks, it offloads control tasks from the central controller to local controllers with limited overhead introduced. Under the architecture, a distributed optimization framework is proposed, and a typical optimization problem is studied to illustrate the effectiveness of the proposed architecture and framework. Both analysis and experiments validate that the proposed architecture and framework can improve the network objective during the optimization, meanwhile balancing load and improving scalability and responsiveness.