Edge computing (EC) has emerged as a key technology in future communication networks to enhance user experience and enable various Internet of Things (IoT) applications. In this paper, we propose an online framework for edge computing resource procurement in which a marketplace (platform) is established between sellers (i.e., resource contributors) and buyers (i.e., resource purchasers). Each buyer has a certain budget for his procurement campaign. The sellers arrive to the platform in an online fashion and offer their computing capacities along with prices that they want to be compensated for their services. Upon the arrival of every new offer, the platform has to make an irrevocable decision, without knowing future information, to accept the offer or not and to allocate the accepted resource to which buyer. We present an efficient online optimization method that helps the platform maximize the total system utility with guaranteed performance. Indeed, the developed model can be applied to other interesting settings such as edge caching and content delivery with slight modifications. Finally, numerical studies are conducted to illustrate the effectiveness of the proposed solution approach.