Complex systems are those systems composed of many, often very simple, interacting autonomous entities. Interactions between these entities give rise to behaviour and patterns at the global level that cannot be predicted by examining the behaviour of any single individual component in the system. By this definition, pervasive computing environments are complex systems. This paper develops the idea that complex systems theory can aid the design of service discovery, and that results from the field of complex networks research can be applied to service discovery protocols to improve their scalability and robustness. We describe the influences of complex systems theory on the design of an existing service discovery protocol for pervasive computing environments, and show that the application of complex systems ideas can improve scalability, performance and robustness of service discovery protocols.