How To Do Maintenance On Website
To do maintenance on website you can use 503 code and use retry after in header. But reading question in another way, you need SEO optimization and lightweight coding on your website so that you will not get any kind of speed issue.
Note: Retry after in header is used for date mentioning, when your server will be available.
Moreover, the server is important for your website. So get the right server that has good bandwidth. If you are planning to do something big do on a dedicated server or you can use Google cloud service. Also, Google's brand trust never puts your confidence down while you developing your project.