A self-configuring sendee can automatically leverage distributed sendee components and resources to compose an optimal configuration according to both the requirements of a particular user and the system characteristics. One major challenge for building such sendees is how to bring in sendee-specific knowledge, e.g., what components are needed and optimization criteria to use, while still allowing reuse of common sendee composition functionalities. We present an architecture in which service developers express their service-specific knowledge in the form of a service recipe that is used by a generic synthesizer to perform sendee composition automatically. We apply our approach to three different services to illustrate the flexibility and simplicity of the recipe representation. We use simulations based on Internet measurements to evaluate how an appropriate optimization algorithm can be selected according to a developer's sendee-specific trade-off between optimality and cost of optimization.