The number of application servers is increasing rapidly on the internet. Installations and configurations of a large number of servers need many human resources. Although Windows plug-ins and Unix Concurrent Versions System (CVS) can be used to install application software from source sites, those software distribution tools are designed based on client-server access methods. Server software installation and configuration are skill-oriented and time-consuming. This paper proposes a framework that supports code migration to implement a scalable server system and simplify the complex installation process of server software. Additionally, with the mobile agent support, the functionalities of an application server can be extended dynamically by migrating and loading the functional modules when needed. The framework consists of five main components, i.e., SmartDNS, Master Server, Slave Server, Application and Functional Module. The SmartDNS provides server scalability, the Master Server is in charge of the application installation, and the Slave Server offers the execution environment for applications. The Application consists of a number of mobile codes that can be migrated from a master site. Then, when a new request arises, a module implemented as a mobile code can be dynamically migrated and integrated into the Application as one of its Functional Modules. A prototype of a scalable entertainment application server has been implemented to demonstrate the feasibility of the proposed framework.