In this paper, we propose a new load balancing algorithm for function-as-a-service (FaaS) platforms. We argue that the load balancing algorithm greatly affects the performance of FaaS platforms because heavy operations, such as virtualization and initialization, can be reduced using caching techniques. We demonstrate that a load balancing algorithm that provides higher locality could accelerate the FaaS platforms by increasing the cache-hit ratio, and propose a greedy load balancing algorithm optimized for FaaS. To generalize the experimental results, we conducted the experiment under three different caching policies that could be adopted in various FaaS platforms. Our evaluation reveals that load balancing algorithms with higher locality and a uniform load balance exhibit better results in all three caching policies, and our proposed algorithm achieves better performance compared to the state-of-the-art algorithms.