$8 LOOK!! ★★ KVM VPS – OpenStack – High Availability – Clustered SSD Storage★★


★★★★★★ WANT TO SAVE $$$? Take a look @ our Openstack KVM VPS Entry Level Plan – $8 ★★★★★★

Joe’s Datacenter has been in business since 2008 and provides affordable, unmanaged vps solutions. We own our data center which is located in Kansas City– MO Midwest. Our 2x battery-powered UPS’s and 2x diesel generators provide backup power for all virtual server infrastructure.

VPS Plan Features:

  • High Availability using KVM Virtualization in Openstack
  • On-Demand Provisioning
  • SOC 2 Type 2 Certified
  • PCI-DSS/HIPAA Compliant
  • Enterprise SSD Cluster
  • Redundant A&B Network Switches
  • Blended mix of Tier 1 Bandwidth Providers
  • Free incoming bandwidth
  • DDoS Protection
  • KVM Virtualization
  • Enterprise Hardware
  • We Own and Operate the Data Center
  • 24/7 On-site Staff
  • Detailed Resource Graphs

General Compute VPS:

  • High Availability auto Fail-over (Openstack KVM)
  • CPU share is 100%
  • Single Thread CPU Mark of 1500+
  • Example: Intel Xeon E5-2620 v4

Purchase Now: Configure Cloud VPS Starting at $8.00

Learn More

Contact Us:

Any questions you have contact Sales Support– sales@joesdatacenter.com

Like us on Facebook, Twitter, and Google+!

Visit our website!

java – How to stop a process from running twice in a clustered environment

I have a Java AWS cluster that starts a number of Spring Batch jobs in other clusters. All of these clusters share the same database. To initiate a Batch job, we go through these steps:

  1. Cluster A pushes a message to a SQS queue
  2. The message is picked off the queue by a Lambda
  3. The Lambda invokes the Spring Boot microservice in Cluster B
  4. Cluster B initializes and launches Spring Batch Job 1, which records in its tables that the job is starting.

So it’s:
Cluster A –> SQS –> Lambda –> Cluster B –> Job 1

The latency from Cluster A getting notified to send the message (and do other preparatory work) to a ready state in Cluster B can be about 90 seconds. I don’t want Job 1 to have 2 copies running. To prevent Job 1 from running twice, we check the Spring Batch table for the Starting message, and if it’s there, we don’t allow the duplicate job to start.

My problem is this:

Cluster A has up to 10 instances. While Job A is initializing, and before it has a chance to record in the Spring Batch tables, another instance in Cluster A can try to run a duplicate job, and it can sneak in during that 90 second window.

I put a synchronized on the method in Cluster A that starts this whole process. That doesn’t seem to be enough. Any ideas as to what else I can do to lock down the process further?

sql server – MSSQL – Unexpected update results on Heap using SET @Variable = Field= @Variable + 1, fixed with Clustered Index

I’m just looking to understand why this is happening, and my google searches were failing me. We are on SQL Server 2016 SP1.

This is the situation. Vendor table that manages IDs by keeping track of current values for each table. A function can be called to return a block of IDs if you are doing an insert.

So we set up a temp table by selecting from the real table using select into (we are cloning a set of data to be reinserted with a different property set).

Then we call the function and get new ids for the number of records (it just returns the max ID, so we do some math to get the next id).

Then we update the table as such:

update #temp set @nextId = Id = @nextId + 1

with the expectation that it will increment by one for each record and set the ids.

Instead, the same ID was set for every 4 records, then it would increment and the next 4 get the next id, etc. Why every 4 records? What went wrong?

results

Even more fun, if we put a clustered index on the table, everything works correctly.

I’m sure it has to do with the table being a heap…but not sure why. Thank you!

sql server – How is the clustered index different from the table itself?

The clustered index is the logical ordering of the data of the table itself into a B-Tree structure. Without a clustered index, the table itself is then stored in a Heap data structure, logically. This article, Clustered Index vs Heap in SQL Server, goes into the structural differences between the two.

One other thing to note is the clustered index also specifies an ordering to the data, when logically stored, whereas a table without a clustered index, and therefor logically stored as a Heap, will typically logically be in the order that the data was inserted into the table.

The benefits of utilizing a clustered index on a table, when architected properly, is that it can be used to improve performance of queries that it covers when the SQL Engine can seek on it for the predicates of those queries, as opposed to a table without a clustered index that would end up requiring a full scan.

To your question in the comments regarding the differences between a clustered index and nonclustered index: the clustered index sorts the table itself, logically, the nonclustered index sorts a copy of the data (whatever fields that nonclustered index covers and includes) from the table, logically.

Regardless of whichever logical data structure that is used, physically the data is stored in Pages and Extents on disk. Pages are typically sets of 8 KB of data, whereas Extents are a collection of 8 physically contiguous Pages.

distributed system – How to share dynamic configuration data in a clustered environment?

I’m working on an side-project which will perform some API requests to a third party service. I’m limited how many requests I can send, so each minute the application is scheduled to get a certain number of entities from the database and make API requets for those entities. The application is designed to work in a clustered environment, so if the limit for how many requets I can send to the third party API is 1000 requets per minute, and I have 4 instances running, each instance should sent only 250 requests per minute.

The part that I’m having problem of finding a good solution for, is about the process of retrieving the entities from the database in a way so I don’t send requests for the same entites by more than 1 instance.

In a case when 4 instances are running, and the database holds 2500 rows of those entities, the first instance will query from 0 to 250, do some work with those entities, and then send requests for them to the third party service, the second instance when triggered by the scheduler, should now pickup from 250 to 500, since the first entities were processed by the first instance already.

The schedulers as you know can be triggered at the same time, so it can be problematic.
I’m using Redis for caching, and one solution that came to mind was to use GETSET of Redis, and save the offset and limit in Redis, since it is single-threaded.

e.g. If the first instance got the entities, it would set offset and limit on Redis to 250:500 (offset:limit), when the second instance is triggered, it would get that value, query the entities in this range, and update it to 500:750.

I’m not sure if this is the correct solution, and if there is something out there that can be more appropriate for this use case.

Note: I know that 1000 requests per minute are nothing, and can be handled perfectly by one node, but this is more of a side-project I’m using for learning mostly.

sql server – SSAS Clustered Instance – no connection could be made because the target machine actively refused it

I have a clustered SSAS Tabular named instance (TAB_PROD) running on SQL Server 2016 SP2/Windows 2012 R2.

When the instance is running on Node1 in the cluster I can connect to it using

  • SQL Network Name + Instance : TABULARTAB_PROD

But when the instance is failed over to Node2 in the cluster I can no longer connect to it using TABULARTAB_PROD. When I do I get the error “no connection could be made because the target machine actively refused it :59755”

SQL Server Browser is running on both nodes in the cluster as I know named SSAS instances use dynamic ports assignments. I’ve tried switching the account that runs Browser from Local Service to Local System as I’ve seen some suggestions that might resolve this, but it didn’t work.

Grateful for any suggestions as to why it only connects on one node in the cluster.

clustered index – Does the primary key of a table help decide what block a row is written to in Oracle?

I’m trying to refactor a slow Oracle database, where the developers naively chose a VARCHAR2 UUD4 as the primary key for what is really an append only time series dataset. I’ve found that the uniqueness check for the primary key (frustratingly I can’t quite convince the senior developer to drop that uniqueness constraint) and foreign key checks for UUID4s are the cause of poor performance.

This is the first time I’ve touched Oracle in my career, so I’m unfamiliar with how it works. In MySQL the primary key absolutely effects how the table is allocated physically, but I am getting mixed messages about how it affects things in Oracle. Obviously there are index-optimised-tables, but those have to explicitly set.

Looking at the index statistics for the primary key, the clustering factor is nearly as high as the row count. Did the random primary key have anything to do with that?

If I have a random primary key, does it affect how the row is physically allocated? For instance, would it mean a similarly random allocation of the row to a block?


If so, how can I change that so the database will try to cluster the writes to a smaller set of blocks (to reduce random IO)? Would moving to a ‘clustered’ identifier like a UUID1 improve
insert performance?