Stake logo

Share

The Tech Diaries Vol 1. Amazon Web Services

The Tech Diaries Vol 1. Amazon Web Services

A behind-the-screens look at what goes into being a global leader in digital investing space.

29 March 2021

The Stake community is filled with more than just traders and investors. Within this group are engineers, entrepreneurs, and innovators wanting to know how our platform is built. To begin, let’s look at the way we integrate with the best in class cloud solutions that our partner, Amazon Web Services, develops.

API Gateway

Our team has been hard at work to launch API Gateway, an AWS managed service that allows infrastructure engineers to easily maintain and secure APIs at any scale

What are some of the benefits of API gateway?

Stake’s mobile app and website communicate with its servers via a RESTful API layer. API Gateway has all the benefits of enterprise-grade middleware including:

  • Easy monitoring of API usage and changes
  • Cloudwatch logging and alarms alerting the team at busy times
  • Serverless infrastructure with automatic scaling

As our number of users continues to grow, serverless scaling and extensive monitoring become critical to providing a seamless experience around the clock.

API Gateway and Microservices

As Stake continues to build out its microservice architecture, client-to-microservice communication becomes a critical element to consider.

One approach would be to have direct client-to-microservice communication, whereby a client app can make requests directly to some microservices, as follows:

However, realistically the example above is not practical. Client apps usually need to consume functionality from more than one microservice. Therefore, introducing an intermediate level (or Gateway) between microservice-based applications can help us avoid the following problems:

  • The need to roll out a new app version and force users to update
  • Too many round trips between client apps and servers (which would add latency).
  • Further security issues by exposing too many microservice endpoints to the internet.

Therefore, an API gateway can act as the intermediate proxy between client application requests as follows:

In fact – you can (and we do) have many API gateways talking to each other, but without getting too complex, hopefully, this simple example has illustrated some benefits.

SQS (Simple Queuing Service)

In the investing world, speed of execution and information flow in real-time becomes absolutely pivotal. We all want to know the second a stock becomes ready to trade after IPO, immediate feedback on trade executions, and our portfolio balance marked to the latest stock prices.

With millions and millions of requests and messages passing through our system every month, we need to make sure nothing goes missing!

There are lots of different ways of managing this – and one way we are currently using is a simple queuing service.

One example is when our broker-dealer executes trades. Our broker-dealer publishes messages about the execution to an SQS queue, which Stake then receives. Stake redistributes these messages to queues sitting in all of its AWS data centres. Receivers of these messages are called consumers. When a consumer receives a message it may execute some code.

For example, a consumer has been built to give you notifications of real-time execution via email, and also making sure that trade execution is reflected in all the relevant places (e.g. holdings and buying power). Once you get to a certain scale, without queuing, any system risks messages not being processed in time (and out of order). Many parts of our business continue to make more active use of this technology, to support both our customers and operations staff having visibility on all things real-time.

S3 Web Hosting

Our desktop platform has been available to Australians and New Zealanders, and we are super excited to get it live in the UK and Brazil.

Up until this point, we have been statistically serving the site from AWS on a dedicated EC2 out of a single datacenter.

UK and Brazil change the game. We of course want the best possible experience for all our customers across the globe!

By transitioning our web hosting to utilise S3 and making use of AWS’s extensive edge-location network for geo-located caching, we are making sure our UK and Brazilian customers get the best possible browser experience.

← Back to blog

Want more?

You know what to do

Insights, trends and company deep dives delivered straight to your inbox.


Stake logo
Over 7,000 5-star reviews
App Store logoGoogle Play logo

Subscribe to our free newsletters

By subscribing, you agree to our Privacy Policy.

Stakeshop Pty Ltd, trading as Stake, ACN 610105505, is an authorised representative (Authorised Representative No. 1241398) of Sanlam Private Wealth Pty Ltd (Australian Financial Services Licence No. 337927) ('Sanlam') and an authorised representative (Authorised Representative No. 1241398) of Airwallex Pty Ltd (Australian Financial Services Licence No. 487221) ('Airwallex'). Stake is not authorised by Airwallex under Airwallex’s AFSL to arrange for clients to be issued with securities as Airwallex is not authorised under its AFSL for this purpose. Stake is not authorised by Sanlam under Sanlam’s AFSL to arrange for clients to be issued with a non-cash payment facility as Sanlam is not authorised under its AFSL for this purpose. Stake SMSF Pty Ltd (‘Stake Super’) is not licensed to provide financial product advice under the Corporations Act. This specifically applies to any financial products which are established if you instruct Stake Super to set up a self managed super fund (‘SMSF’). When you sign up to Stake Super, you are contracting with Stake SMSF Pty Ltd who will assist in the establishment of a SMSF under a ‘no advice model’. You will also be referred to Stakeshop Pty Ltd to enable your trading account and bank account to be set up in order to use the Stake Website and/or App. Stakeshop Pty Ltd will also run marketing and promotions to you under. For more information about SMSFs, see our SMSF Risks page.The information on our website or our mobile application is not intended to be an inducement, offer or solicitation to anyone in any jurisdiction in which Stake is not regulated or able to market its services. At Stake and Stake Super, we’re focused on giving you a better investing experience but we don’t take into account your personal objectives, circumstances or financial needs. Any advice given by Stake is of a general nature only. As investments carry risk, before making any investment decision, please consider if it’s right for you and seek appropriate taxation and legal advice. Please view our Financial Services GuideTerms & ConditionsPrivacy Policy and Disclaimers  before deciding to invest on or use Stake or Stake Super. By using our website or service in any way, you agree to our Privacy Policy and Terms & Conditions. All financial products involve risk and you should ensure you understand the risks involved as certain financial products may not be suitable to everyone. Past performance of any product described on this website is not a reliable indication of future performance. Stake and Stake Super are registered trademarks in Australia.

Copyright © 2024 Stake. All rights reserved.