StockTwits, a social network for the finance community, successfully revamped its message-sharing system by replacing its initial MySQL and Redis-based architecture with Elasticsearch, significantly improving request speed and user satisfaction while maintaining scalability for future traffic growth. The original system struggled with scalability issues due to complex caching and database queries, prompting a shift to Elasticsearch, which allowed for more efficient querying and indexing of messages and user relationships. By implementing a solution involving two indexes—"messages" and "friendships"—StockTwits was able to streamline its architecture, reduce code complexity, and introduce new features such as fast filter queries and full-text search capabilities. The team overcame challenges related to index growth by partitioning the message index into monthly chunks and using aliases for querying, which resulted in sub-millisecond query performance. The changes not only simplified the system's design but also positioned StockTwits to easily scale by adding nodes and enhancing its application features, supported by Elasticsearch's efficient caching and query handling.