Building an event-driven solution for AvalonBay property leasing and search
AWS Architecture BlogBuilding an event-driven solution for AvalonBay property leasing and searchby Amarpreet Kalra, Dr. Ivan Panushev, and Kausik Dey | on10 FEB 2023| inAmazon EventBridge,Amazon OpenSearch Service,Amazon Route 53,Architecture,AWS Lambda,Customer Solutions|Permalink|ShareIn this blog post, we show you how to build an event-driven and serverless solution for property leasing and search that is scalable and resilient. This solution was created forAvalonBay Communities, Inc.—a leading residential Real Estate Investment Trusts (REITs). It enables:More than 150,000 multi-parameter searches per dayThe processing of more than 3,500 lease applications and 85,000 individual rent payments per monthAvalonBay is an equity REIT. The company has a long track record of developing, redeveloping, acquiring, and managing apartment homes in top U.S. markets. AvalonBay builds long-term value for customers using innovative technology solutions.The company understands that data-driven insights contribute to targeted business growth. But AvalonBay found that managing the complex interdependencies between multiple data sets—from real estate and property management systems to financial and payment systems—required a new solution.The challengeAvalonBay owned or held a direct or indirect ownership interest in 293 apartment communities containing 88,405 apartment homes in 12 states and Washington, D.C., as of September 30, 2022.Of these, 18 communities were under development and one was under redevelopment. This presented a unique challenge to both internal and external users looking to search and lease apartment units based on multi-parameter selection criteria in geographically dispersed regions. For example, finding units in buildings with specific amenities, lease terms, furnishings and availability dates.Overview of solutionAvalonBay’s fully managed leasing solution for applicants and residents is hosted by Amazon Web Services (AWS). The solution is secure, autoscaling, and multi-region, ensuring resiliency and performance with efficient resource usage.In this event-driven solution, AvalonBay’s leasing service is hosted in multiple AWS Regions to provide low latency response to users across various geolocations. This blog post focuses on showing use case implementation in only one region—Region East— as shown in Figure 1.Figure 1. AvalonBay lease processing platformSeveral AWS services come together in this solution to meet key company objectives. Let’s explore each one and its purpose within the architecture.Amazon Route 53: For AvalonBay’s Lease Processing solution, any non-transient service failure is unacceptable. In addition to providing a high degree of resiliency through aMulti-AZarchitecture, Lease Processing also provides regional-level high availability through its multi-Region active-active architecture. Route 53 withlatency-based routingallows dynamic rerouting of requests within seconds to alternate Regions.Amazon API Gateway: Route 53 latency-based routing is configured across multiple AWS Regions asRoute 53to route traffic to anAPI Gatewayendpoint.API Gateway authorizerswere added to control access to APIs using anAmazon Cognitouser pool.AWS Lambdawithprovisioned concurrency: The Lambda services are set up for automatic scaling, secured through a private subnet, and span across Availability Zones. This provides horizontal scaling capability, self-healing capacity, and resiliency across Availability Zones. Provisioned concurrency minimizes the estimate of cold starts by generating execution environments. It also greatly reduces time spent on APIs invocations.Amazon AuroraV2 forAmazon Relational Database Service (Amazon RDS)PostgreSQL-Compatible Edition: Aurora Serverless V2 is an on-demand, autoscaling configuration for Aurora. Serverless Aurora V2 PostgreSQL-Compatible is used for the Lease Processing solution. The global database was configured with two Regions; us-east-1 as the primary cluster and us-west-2 as the secondary cluster. Automated Aurora global database endpoint management for planned and unplanned failover is configured through a Route 53 private hosted zone,Amazon EventBridge, and Lambda.Amazon RDS Proxy for Aurora: Amazon RDS Proxy allows the leasing application to pool and share database connections to improve its ability to scale. It also makes the leasing solution more resilient to database failures by automatically connecting to a standby database instance while preserving application connections.Amazon EventBridge: EventBridge supports the solution through two primary purposes:Oversees lease flow events– During the lease application process, the solution generates various events which are consumed by AvalonBay and external applications such as property management, finance portals, administration, and more. Leasing events are sent to EventBridge and various event rules are configured for multiple destinations including Lambda,Amazon Simple Notification Service (Amazon SNS), and external API endpoints.Handles global Aurora V2 failover– Aurora generates events when certain actions are taken or events occur, including any type of global database activity.When a managed planned failover is initiated—either via theAWS Command Line Interface (AWS CLI), API, or console—the global database failover process starts and generates an event.When an Aurora cluster is removed from a global cluster through the AWS CLI, API, or console, the Aurora cluster is promoted as a single primary cluster. Once this process is completed, it generates an event.An EventBridge rule is created to match an event pattern any time a global database managed planned failover completes successfully in a Region. When a failover is completed, the completion event is detected, and this rule is triggered. The event rule is configured to invoke a Lambda function that is triggered on global database failover and updates theAmazon CloudFront CNAMErecord to the correct value.Scalable search solutionLeasing professionals need to easily scan a huge amount of property information using AvalonBay’s Search Solution to obtain required information.Using theAmazon OpenSearch Service, agents can generate property profiles and other asset data to identify matching units and quickly respond to end customers.OpenSearchis a fully open-source search and analytics engine that securely unlocks real-time search, monitoring, and analysis of business and operational data. It is employed for use cases such as application monitoring, log analytics, observability, and website search.The AvalonBay Search Service solution architecture featuring OpenSearch is shown in Figure 2.Figure 2: AvalonBay Search Service solution architectureAvalonBay search requires search criteria includingkeyword and Universal Resource Identifier (URI)search,SQL-based search, andcustom packagesearch, all of which are detailed in theAmazon OpenSearch Service Developer Guide.OpenSearch automatically detects and replaces failed OpenSearch Service nodes, reducing the overhead associated with self-managed infrastructures.Let’s explore this architecture further by step.Amazon Kinesisevent stream – The AvalonBay community requires near real-time updates to search attributes such as amenities, features, promotion, and pricing. Events created through various producers are streamed through Kinesis and inserted or updated through OpenSearch.Amazon OpenSearch – OpenSearch is used for end-to-end community search—a managed service making it easy to deploy, operate, and scale OpenSearch clusters in the AWS Cloud. As community search data is read-only,UltraWarmandcold storageare also used based on usage frequency.Amazon Simple Storage Service (S3): Various community documents, policies, and image or video files are key search elements. They must be maintained securely and reliably for years due to contractual obligations. Amazon S3 simplifies this task withhigh durability,lifecycle rules, andvaried controls for retention.ConclusionThis post showed how AvalonBay has built and deployed custom leasing and search solutions on AWS serverless platforms without compromising resiliency, performance, and capacity requirements. This is a 24/7, fully managed solution with no additional equipment on-premises.Choosing AWS for leasing and search solutions gives AvalonBay the ability to dynamically scale and meet future growth demands while introducing cost advantages. In addition, the global availability of AWS services makes it possible to deploy services across geographic locations to meet performance requirements.TAGS:Architecture,aws lambda,Customer Solutions,Route 53Amarpreet KalraAmarpreet Kalra is a Senior Solutions Architect at AWS, working with customers to design system architectures onto AWS using the AWS Cloud best practices.  Amarpreet spent 15 years designing and building distributed systems for financial services. When he is not rubbing shoulders with the brilliant minds of AWS customers, he enjoys a quiet life with his family in Charlotte, NC.Dr. Ivan PanushevDr. Ivan Panushev is the Principal Partner Solutions Architect for Engineering, Construction, and Real Estate at AWS. He is also a member of the US National BIM Program Steering Committee at the National Institute of Building Sciences (NIBS). Dr. Panushev holds doctoral, master’s, and bachelor’s degrees in engineering and design, all from Harvard University.Kausik DeyKausik Dey is a New Jersey-based Director of Software Engineering at AvalonBay. He has more than 20 years of experience in the architecture, design, and implementation of scalable, resilient, and highly available solutions. He enjoys working closely with business stakeholders to support their digital transformation and AWS adoption journey. His areas of focus are serverless, application integration, and security. He spends his spare hours travel and reading.
In this blog post, we show you how to build an event-driven and serverless solution for property leasing and search that is scalable and resilient. This solution was created for AvalonBay Communities, Inc.—a leading residential Real Estate Investment Trusts (REITs). It enables: More than 150,000 multi-parameter searches per day The processing of more than 3,500 […]
Amarpreet Kalra
Amazon EventBridge Amazon OpenSearch Service Amazon Route 53 Architecture AWS Lambda Customer Solutions