We consider the problems of consensus optimization and resource allocation, and we discuss decentralized algorithms for solving such problems. By “decentralized”, we mean the algorithms are to be implemented in a set of networked agents, whereby each agent is able to communicate with its neighboring agents. For both problems, every agent in the network wants to collaboratively minimize a function that involves global information, while having access to only partial information. Specifically, we will first introduce the two problems in the context of distributed optimization, review the related literature, and discuss an interesting “mirror relation” between the problems. Afterwards, we will discuss some of the state-of-the-art algorithms for solving the decentralized consensus optimization problem and, based on the “mirror relationship”, we then develop some algorithms for solving the decentralized resource allocation problem. We also provide some numerical experiments to demonstrate the efficacy of the algorithms and validate the methodology of using the “mirror relation”.