DelphiFeeds.com

  • Dashboard
  • Popular Stories
  • Trending Stories
  • Feeds
  • Login
Trending now

Powerful Multi-sensor Imaging Tool For Processing And Analyzing Hyperspectral Images Built In Delphi

How to write Delphi apps to run and look great on Windows, macOS and Linux

VCL Grid goodies

Learn A Powerful Python Concept: Modules And Packages With A Delphi Windows GUI App

The IFDEF Problem!

Quickly Build Natural Language Processing Capable GUI Apps With Delphi And Python NLTK

Freebie Friday: capture controls or forms

Easily Learn How To Use Python List Comprehensions In A Delphi Windows GUI App

How to deploy a ISAPI application on AWS Elastic Beanstalk

1
Roberto Schneiders Roberto Schneiders 5 years ago in Auto Scaling, AWS, AWS Elastic Beanstalk, DataSnap, Delphi, Failover, ISAPI, Load Balancer, REST, Uncategorized, WebDeploy 0

I’m working on a new infrastructure for a DataSnap server. I need some basic stuff, pretty straightforward in the most technologies, but not very common for delphi servers, like automated distributed deploys, load balancing, auto scaling, failover.

The AWS documentation says that Elastic Beanstalk only supports some technologies (Ruby, .NET, Java, Nodejs, etc), in fact, some languages, which is weird. However, the .NET support includes IIS applications. So, if we can generate a ISAPI DataSnap server, it will work.

It is surprisingly simple. Probably takes less than 5 minutes. We only need to do this:

  • Create a WebDeploy package
  • Create the Elastic Beanstalk application

Creating a Web Deploy package

I created a github repository (RobertoSchneiders/webdeploy-isapi-package) with a web deploy package that contains an ISAPI Datasnap Server, you can use as an example or starting point.

The other option is to configure your ISAPI on your local IIS and then use the Export Application to generate the package. You only have to make sure to rename the “Parameter 1” to “IIS Web Application Name” on the second page of the wizard (References from IIS 7.5, may be different on 8.5).

You will have to add some ebextensions, to allow IIS to run ISAPI applications. More details on the github repository readme.

Creating the application on AWS Elastic Beanstalk

I will show some settings step by step, only for those who do not know the AWS EB, but it’s very simple.

On AWS Elastic Beanstalk console page:

  1. Create New Application -> Inform the nameeb_1
  2. Create web server on the New Environment pageeb_2
  3. On predefined configuration select the IIS platform eb_3You can choose if you want Load balancing and Auto Scaling or a Single Instance.
  4. Upload your WebDeploy package (You can configure automated deploys via AWS S3)eb_4
  5. In the permissions page you have to inform some roles, like this:eb_5If this is the first time you are using EB you have to create them, but not worry, you can use the default values, that the wizard will sugest to you. You can not use the same roles for Instance and Service, it will not work.

And that’s it. Now you have a Datasnap application running on a Windows Server 2012 Core, IIS 8.5, load balancer, auto scaling, failover, almost zero downtime deploy.

Some important details

  1. For the failover work properly you must configure a Health Check URL on Configuration Details page.
  2. You probably will have to customize the Auto Scaling rules according to resource consumption of your application.
  3. With Auto Scaling you will have more then one instance running, so, you must be aware of the context.
  4. If you want to use the HTTP Callbacks you will have to use the Sticky Sessions on the load balancer.
  5. You can delegate the SSL for the load balancer and remove that responsability from the datasnap server, it is very simple to configure. The Elastic Load Balancer also supports cyphers.

Conclusion

It is possible to have a modern infrastructure even if you are dealing with Datasnap, and this is amazing. I hope you enjoyed and that has been helpful.

I have not shown how to configure automated deploy on this post, but I hope to do so in the future.

Trending Stories

  • Powerful Multi-sensor Imaging Tool For Processing And Analyzing Hyperspectral Images...

  • How to write Delphi apps to run and look great...

  • VCL Grid goodies

  • Learn A Powerful Python Concept: Modules And Packages With A...

  • The IFDEF Problem!

Embarcadero GetIt

  • Brook Framework

    Microframework which helps to develop web Pascal applications.

  • Trial - TMS Scripter

    Add the ultimate flexibility and power into your apps with native Pascal or Basic scripting and […]

  • Trial - TMS VCL Chart

    DB-aware and non DB-aware feature-rich charting components for business, statistical, financial […]

  • Trial - TMS VCL Cloud Pack

    TMS VCL Cloud Pack is a Delphi and C++Builder component library to seamlessly use all major cloud […]

  • Trial - TMS VCL UI Pack

    Create modern-looking & feature-rich Windows applications faster with well over 600 components […]

  • Learn Delphi Programming
  • Learn C++
  • Embarcadero Blogs
  • BeginEnd.net
  • Python GUI
  • Firebird News
  • Torry’s Delphi Pages
Copyright DelphiFeeds.com 2021. All Rights Reserved
Embarcadero
Login Register

Login

Lost Password

Register

Lost Password